Previous Next

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:
Access:
Applies to:
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.
 
Syntax 
GetTableInfoByPosition(INPUT element, OUTPUT table-name, OUTPUT proc-name
The second version returns the handle to the temp-table and the name of the procedure or class that instantiated the temp-table.
 
Syntax 
GetTableInfoByPosition(INPUT element, OUTPUT table-handle, OUTPUT proc-name
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.

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.