Try OpenEdge Now
skip to main content
DataServer for Oracle
RDBMS Stored Procedure Details : Interfacing with RDBMS stored procedures : Loading a result set into a temp-table : Employing additional enhancements
 
Employing additional enhancements
The temp-table technique offers even greater programming benefits as it extends both send-sql-statement options and stored procedures through the result processing techniques previously described in this chapter. For example, by mapping the PROGRESS_RECID to the ROWID field in temp- tables, you can easily support KEY definitions required by the ProDataSets to ensure that your data mappings between the foreign data source and the temp-table are accurate. Accurate data mappings are essential for sending data back from the temp-table to the data source. Non-ROWID key definitions can also be described with a unique key.
ProDataSets functionality is based on one or more temp-tables that share and extend basic temp-table functionality. For more information about ROWID field and using the send-sql-statement with the LOAD-RESULT-INTO option, see ROWID support. For in-depth discussions of temp-tables and more information about ProDataSets, see OpenEdge Development: ProDataSets.
The following table highlights additional language elements you can use with the stored procedure and the send-sql statement language to use ROWID.
Table 21. Returning result sets and loading the data into temp-tables
ABL
Description
RUN STORED-PROCEDURE statement
Executes the stored procedure or send-sql- statement option and tells OpenEdge that the stored procedure has ended.
LOAD-RESULT-INTO phrase
Allows data from a result set that is returned for a foreign data source either through a stored procedure or a send-sql- statement option to be put into one or more temp-tables. Static, unprepared dynamic, and prepared dynamic temp-tables are supported. Only one result set can be returned when when using the send-sql-statement option.
Note: When using SQL statement(s) through a send-sql-statement option or stored procedure to load result sets into temp-tables, RUN STORED-PROC carries an implicit Run CLOSE-PROC statement. (The stored procedure's output parameters are available after the RUN STORED-PROC executes and closes the procedure.)
PROC-STATUS phrase
Reads the return value (optional).