TEMP-TABLE-PREPARE( ) method
- Last Updated: January 18, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
Signifies that all the field and index definitions for a temp-table have been supplied.
Return type: LOGICAL
Applies to: Temp-table object handle
Syntax
|
- temp-table-name-exp
- A CHARACTER expression that evaluates to a temp-table name to be used in subsequent query statements that refer to this temp-table.
- before-table-exp
- A LOGICAL expression that allows you to explicitly generate a
before-table for a dynamic temp-table. TRUE indicates the AVM will create the
before-table. (The AVM generates the name for this before-table.) The default value is
FALSE. If you specify the Unknown value (?), the method uses the default value of FALSE.
Note: When passing a temp-table to a method (or procedure/function), you are required to have compatible schema for the table on both the caller and called sides. If the temp-table on either side has a before-table, in some cases the other side may also be required have a before-table, or the AVM will raise an error.
The temp-table is in an UNPREPARED state after the first definitional method is called until this method is called. During this time, only ADD/CREATE type methods may be called.
The TEMP-TABLE-PREPARE() method must be called after all
fields and indexes have been created and before any non-ADD/CREATE method can be called.
This method causes the pending list of field and index definitions to become part of the
actual temp-table object, which puts the temp-table in a PREPARED state (that is, makes it
ready for use).
Notes
- The
NAMEattribute of theTemp-tableobject handle is writeable for dynamic and AVM-generated temp-tables. A new temp-table name cannot be assigned until theTEMP-TABLE-PREPARE()method has been executed. - The
TEMP-TABLE-PREPARE()method cannot be used together with other assignments in a singleASSIGNstatement.