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 : Creating a temp-table layout plan
 
Creating a temp-table layout plan
When using static or prepared dynamic temp-tables, you must define the temp-table layout in your application program to accommodate specific result sets before you attempt to populate the temp-tables with data. If a SQL statement retrieves more than one results set, you must define multiple temp-tables to be able to retrieve all the data. Therefore, the success of this approach depends to a large extent on your:
*Understanding of the specific data your foreign data source is providing you through a given stored procedure
*Ability to correctly define temp-tables
The following types of temp-tables can support results sets:
*Static — A temp-table whose schema is defined at compile time.
*Dynamic — A temp-table whose schema is defined at run time. There are two types of dynamic temp-tables: dynamic-prepared and dynamic-unprepared.
Keep in mind that you can pass handles of temp-tables that contain a mixed array. A mixed array is one in which some of the temp-table handle elements can be static while others can be dynamic. Also, note that a stored procedure supports the use of an INT64 data type in static and dynamic temp tables when the LOAD-RESULT-INTO phrase processes the procedure's result set on the RUN-STORED-PROC statement.