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 ABL compiler issues an error if you try to specify PROC-HANDLE and LOAD-RESULT-INTO on the same Run STORED-PROC statement.
The ABL 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 statement for which you have defined the LOAD-RESULT-INTO function, the following error message appears:
Error "No active stored procedures. (2101)" — This error message occurs when no handle is specified in the statement.
Error "No active procedure for specified proc-handle. (2475)" — This error message occurs 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.