Temp-table attributes
- Last Updated: September 22, 2023
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
This section describes the attributes you can access through a temp-table handle.
DYNAMIC attribute
DYNAMIC is a logical attribute that returns true if the temp-table is dynamic and false if is static.
NAME attribute
NAME attribute is the name of the temp-table. For a
static temp-table, it is the name you gave it in the DEFINE
TEMP-TABLE statement. For a dynamic temp-table, it is the name you
specify in the TEMP-TABLE-PREPARE() method. Thus, the
NAME attribute is not defined for a dynamic temp-table until
you have prepared it.
PREPARED attribute
PREPARED is a logical attribute that returns true if the temp-table has been prepared and false otherwise. It always returns true for a static temp-table.
DEFAULT-BUFFER-HANDLE attribute
Every temp-table, whether static or dynamic, has a default buffer. DEFAULT-BUFFER-HANDLE attribute holds the handle of that buffer. You use the buffer to create or delete records in the table. The default buffer has the same name as the temp-table, just as the default buffer for a database table has the same name as the table. The default buffer handle is not assigned until the temp-table is prepared.
PRIMARY attribute
PRIMARY is a CHARACTER attribute that holds the name of the primary
index for the table. You can inherit the definition of the primary index from
another table, in the CREATE-LIKE() method, or you can define a
temp-table index to be primary. This is the index the records in the table are
sorted on, if there are no other sort criteria or if another index is not used to
satisfy selection criteria of a WHERE clause on the table. You can
set the value of the PRIMARY attribute for a dynamic temp-table
only if the temp-table has not yet been prepared.
UNDO attribute
UNDO is a LOGICAL attribute that returns true if the
temp-table has undo properties and false if it is NO-UNDO. Because
the static DEFINE TEMP-TABLE statement allows you to specify the
NO-UNDO keyword on the definition, just as you can for
variables, the default value of UNDO for a static temp-table is
true. For a dynamic temp-table, the default value of UNDO is false.
You can set the UNDO attribute for a dynamic temp-table only before
it has been prepared.