skip to main content
OpenEdge Development: AppBuilder
Frequently Used Dialogs : Temp-tables maintenance
Temp-tables maintenance
The button shown is available in the Procedure Settings dialog box:
The editor is also called automatically when you choose to define a temp-table in a SmartDataObject.
Temp-tables are temporary (scratch) tables. You might choose to create and use a temp-table to avoid the overhead of manipulating a large original table. By selecting out only those records that are of interest, and creating from that subset a temp-table, you can make subsequent processing faster or more convenient by some large factor.
Temp-tables have these characteristics:
*Single-user — Unlike regular database tables, you cannot make the same temp-table available to more than one user. They are session-bound.
*Temporary — Temp-tables never outlast the session in which they are created, and might have a much shorter lifespan than that. You can choose to make the table:
*Local — (Default). Creates a new local table. A local table is available only to the defining procedure, and is destroyed when that procedure terminates.
*Shared — Specifies that the table is not to be created, but is being shared by the calling procedure that did create it, within the current session.
*New Shared — Creates a new table and allows it to be shared by called procedures in the same session, if they declare the table Shared.
*New Global Shared — Creates a new table and allows it to be shared by all other procedures in the session that also declare the table New Global Shared. Note that although all procedures must use the New syntax, the table is allocated only once.
Temp-tables can be declared NO-UNDO, which improves performance by eliminating the overhead of journaling. In AppBuilder, temp-tables are created NO-UNDO by default.
Temporary table storage can be allocated in memory or on disk. There are some differences in the characteristics of a table depending on where it resides. See OpenEdge Getting Started: ABL Essentials for a discussion of these differences.
To allocate a temp-table:
1. Choose ToolsProcedure Settings. When that dialog box opens, click the Temp-Tables button (the drum icon). The Temp-Table Maintenance dialog box appears:
2. Click Add to create a temp-table. The Table Selector dialog box appears, showing the currently connected databases:
3. Choose a database, if necessary, and the table you wish to copy from. Click OK. The Selector dialog box closes and your selection appears in the Temp-Table Maintenance dialog box, as shown:
Note that AppBuilder always defines the temp-table as being LIKE the reference table.
4. Modify the default properties, if they do not suit your purposes, and click OK. The default properties are:
*Allocation on disk (temp-table) rather than memory (buffer).
*Local scope rather than Shared or Global Shared.
*Name same as reference-table name. You might wish to change this to more clearly identify the reason you are using a temporary copy of the table.
*No additional fields. You can define additional fields, but they are not equivalent in all ways to the actual fields in the database records. You cannot refer to additional fields in a query, for example.
Note that this editor does not create code to populate the table. You must do that by hand, if the object in your application expects to find records in the table.