Using ROWID with RUN STORED-PROCEDURE and LOAD-RESULT-INTO
- Last Updated: April 3, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The example in this section assumes you migrated your database to Oracle
using the CREATE RECID option, as discussed in the ROWID characteristics . This example and all subsequent examples show ROWID as
being represented by the 8-byte integer value of the PROGRESS_RECID column as opposed to some other unique single-component index
designated in your database to be the Progress RECID.
ROWID of a temp-table or native ROWID,
you would need to map it accordingly, just as the example maps PROGRESS_RECID.The RUN
STORED-PROC command has no native awareness that the Oracle
Database Table is being queried for the result set(s) it generates.
Therefore, to allow DataServer technology to convert the stored PROGRESS_RECID value
into a native Progress ROWID value, the physical
name of the target database table must be known. To achieve this
bond, the temp-table that the stored procedure populates must be
associated with an OpenEdge ProDataSet object.
Simple ProDataSet code
This example shows an ABL query filling the temp tables of a ProDataSet. It is used as the baseline code which is referenced throughout the remainder of this section.
|
Using the LOAD-RESULT-INTO technique to populate the underlying temp-table of a ProDataSet
This example combines code from the above codes applying the results of the
RUN STORED-PROC [LOAD-RESULT-INTO] technique, rather than
an ABL query, to fill the temp-table associated with a ProDataSets. Key points about this example are
presented following the example.
|
Keep the following key points in mind as you review this example:
- The
TEMP-TABLEfield that is mapped to thePROGRESS_RECIDcolumn should be changed from its standard definition ofINTEGERtoROWID. In this example, the result column location wherePROGRESS_RECIDis being returned has been namedrRecidin the temp-table. This renaming occurs in Example 3-26 because of the following line:
|
- The
TEMP-TABLEmust be defined to the ProDataSet. The following line, another excerpted line of code from this example, shows this definition:
|
- The technique, demonstrated in this example, does not change the default behavior of the
ROWIDfunction, but provides a mechanism for theROWIDvalue to be stored along side its corresponding result rows; therefore, using theROWIDvalue to access database rows is unconventional with respect to the normal, or more typical, association betweenROWIDand a database table row. The following code demonstrates this difference.Default use of
ROWIDfunction on a record buffer, as excerpted from this example:
|
In contrast, the following excerpt from this example demonstrates an alternative use of the
ROWID value with a temp-table:
|