Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
RDBMS Stored Procedure Details : Handling errors : Error messages related to using the Load-Result-Into phrase
 

Error messages related to using the Load-Result-Into phrase

Note the following situations in which error conditions related to the use of LOAD-RESULT-INTO are reported:
*The compiler issues an error if you try to specify PROC-HANDLE and LOAD-RESULT-INTO on the same Run STORED-PROC statement.
*The compiler issues an error if you use PROC-STATUS without specifying the LOAD-RESULT-INTO function.
*The compiler issues error messages when the number of handles is not equal to the number of result-sets specified in the statement. For example:
*Error "Only 2 handles supplied but there are at least 3 result-sets (12209)" — This error message appears when two handles and three result-sets are specified in a statement.
*Error "Received an invalid handle (element 3) when processing stored procedure's result-set (12212)" — This error message appears when four handles and three result-sets are specified in a statement.
*If you try to execute the CLOSE STORED-PROC statement after the Run STORED-PROC statementfor which you have defined the LOAD-RESULT-INTO function, the following error message appears:
*Error "No active stored procedures. (2101)" — This error message appears when no handle is specified in the statement.
*Error "No active procedure for specified proc-handle. (2475)" — This error message appears when a handle is specified in the statement.
The system generates either of the previous error messages as it assumes a second CLOSE STORED-PROC statement has been incorrectly executed in the current implementation.
For more information about the enhanced stored procedure functions and statements, see Table 22.