Progress
Language Reference
CREATE TEMP-TABLE Statement
Creates a temp-table dynamically at run time. The temp-table that is created is empty and must be defined using ADD/CREATE methods.
SYNTAX
widget-handle
A variable of type WIDGET-HANDLE that represents the handle of the temp-table object.
IN WIDGET-POOL widget-pool-name
An expression of type CHARACTER that evaluates, at run time, to the name of the widget pool that contains the dynamic temp-table.
NOTE: Widget pool names are not case-sensitive. EXAMPLEThe following example creates a temp-table like the order table and populates it from the order table. In addition, the corresponding sales-rep name is added from the salesrep table.
NOTES
- Once the temp-table fields and indexes are defined using the ADD/CREATE methods, the definition must be terminated by using the TEMP-TABLE-PREPARE method before the temp-table can be used.
- Once the temp-table is prepared, it can be manipulated by using its buffer object handle which is retrieved using the DEFAULT-BUFFER-HANDLE method. All the BUFFER methods are available to the dynamic temp-table.
- The dynamic temp-table object is scoped like the buffer object. It is created in a widget pool and ends when the widget pool ends or when it is deleted with the DELETE OBJECT statement. You may not delete the default buffer object belonging to a dynamic temp-table.
- Errors for dynamic temp-tables do not automatically raise the ERROR condition since they occur inside a widget expression. All the methods that can have errors return FALSE if an error occurs, so they must be tested. If NO-ERROR is in effect in the statement containing the widget reference, no messages display, but they can be retrieved from the ERROR-STATUS system handle.
SEE ALSO
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |