Try OpenEdge Now
skip to main content
ABL Reference
Class Properties and Methods Reference : GetTableInfoByPosition( ) method
 

GetTableInfoByPosition( ) method

Returns information about the position of a temp-table from a list of temp-tables. This is based on the number returned by the TempTableCount property. The method raises an error if it is a not a valid position (not within the TempTableCount range).
Return type: VOID
Access: PUBLIC STATIC
Applies to: Progress.Database.TempTableInfo class

Syntax

This method supports two overloaded versions. The first version returns the temp-table name and name of the procedure or class that instantiated the temp-table.
GetTableInfoByPosition( INPUT element AS INTEGER,
OUTPUT table-name AS CHARACTER,
OUTPUT proc-name AS CHARACTER )
The second version returns the handle to the temp-table and the name of the procedure or class that instantiated the temp-table.
GetTableInfoByPosition( INPUT element AS INTEGER,
OUTPUT table-handle AS HANDLE,
OUTPUT proc-name AS CHARACTER )
element
An integer expression which evaluates to the position of a given temp-table from a list of temp-tables. It must be a value between 1 and TempTableCount.
table-name
Returns a CHARACTER string with the name of the temp-table.
table-handle
Returns the handle to the temp-table specified by the element parameter.
proc-name
Returns a CHARACTER string with the procedure (or class) name. For a static temp-table, it is the procedure with the DEFINE TEMP-TABLE statement. For a dynamic temp-table, it is the procedure which executes the TEMP-TABLE-PREPARE method. The name of the procedure is the name that is specified when you run mydir/test.p.
The following example shows the temp-tables that are currently in the scope for monitoring deployed clients.
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE hTable AS HANDLE NO-UNDO.
DEFINE VARIABLE cProc AS CHARACTER NO-UNDO.

REPEAT i =1 TO Progress.Database.TempTableInfo:TempTableCount:
Progress.Database.TempTableInfo:GetTableInfoByPosition (i, OUTPUT hTable, OUTPUT cProc).
DISPLAY hTable:name hTable:DYNAMIC cProc.
END.