Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
RDBMS Stored Procedure Details : Run Stored-Procedure details : Run Stored-Procedure statement : LOAD-RESULT-INTO phrase
 
LOAD-RESULT-INTO phrase
The LOAD-RESULT-INTO function loads the result sets into a temp-table which is represented by a handle variable. Note that handle can also be defined as extent to enable you to pass more than one temp-table handle in those instances where SQL statement(s) are defined to return more than one result set.
When used with the RUN STORED-PROC statement or stored procedure to load result sets into temp-tables, this function carries an implicit CLOSE-STORED PROCEDURE statement.
Note: The compiler issues an error at runtime if the variable of type handle with the LOAD-RESULT-INTO function does not point to a temp-table.
For additional details about using the LOAD-RESULT-INTO phrase with the temp-table handle, see Loading results into a temp-table.
When used with the LOAD-RESULT-INTO phrase, the temp-table handle identifies the temp-table to which the result set will be loaded.
You can specify an array of one or more temp-table handle elements to retrieve stored procedure result sets and have the DataServer load the result set data directly into the associated temp-table(s). This approach allows you to have direct ABL access to the fields defined in the temp-table.
The following types of temp-tables can support result 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.
For additional details about using the LOAD-RESULT-INTO phrase with the temp-table handle, see Loading results into a temp-table.