Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
RDBMS Stored Procedure Details : Interfacing with RDBMS stored procedures : Loading result sets into temp-tables : Employing additional enhancements
Employing additional enhancements
The temp-table technique offers even greater programming benefits as it extends both send-sql-statement 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 DataSet (commonly referred to as a 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, see ROWID Support. For in depth discussion 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 22. Returning result sets and loading the data into temp-tables
Executes the stored procedure or send-sql- statement and tells OpenEdge that the stored procedure has ended.
Allows data from a result set that is returned for a foreign data source either through a stored procedure or a send-sql- statement to be put into one or more temp-tables. Static, unprepared dynamic, and prepared dynamic temp-tables are supported.
Pass as many temp-tables as result set instances are returned by SQL statements in your Send-SQL or RUN STORED-PROC definition.
Note: When using SQL statement(s) through a send-sql-statement 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.)
Reads the return value (optional).
Note: To optimize enhanced stored procedure calls, it is recommended that you use firehose cursor functionality. Use of firehose cursors provided through the connection pooling functionality supports the fastest way to read and return a result set. For details about connection pooling and firehose cursors, see Connection pooling.