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
handle
IN WIDGET-POOLwidget-pool-name
ExampleThe following example creates a TEMP-TABLE like the
Order
table and populates it from theOrder
table. In addition, the correspondingSalesRep
name is added from theSalesRep
table, as shown:
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 attribute. 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
OpenEdge Release 10.2B
|