CLOSE STORED-PROCEDURE statement
For a non-ABL stored procedure, indicates that the procedure has completed execution and retrieves any return status. For a send-sql-statement stored procedure, closes the SQL cursor used by the procedure.
Syntax
procedure
integer-field
= PROC-STATUSWHERE PROC-HANDLE =integer-field
ExampleThe PROC-STATUS clause of the CLOSE STORED-PROCEDURE statement allows the DataServer for ORACLE to retrieve the text of an ORACLE error message that was passed to raise_application_error. Use the ERROR-STATUS:GET-MESSAGE handle to retrieve the message, as shown in the following example:
Notes
- If you specified a PROC-HANDLE when you ran a stored procedure, you must specify the PROC-HANDLE when you close the stored procedure.
- If you do not specify a PROC-HANDLE, the CLOSE STORED-PROCEDURE statement will close the procedure if there is only one stored procedure running. If there is more than one stored procedure running, an error will be returned.
- You cannot close a send-sql-statement procedure until you have retrieved all row results.
- You can close all stored procedures at once with the following statement:
- For more information on using this statement, see OpenEdge Data Management: DataServer for ODBC and OpenEdge Data Management: DataServer for Oracle.
See alsoPROC-HANDLE function, PROC-STATUS function, RUN STORED-PROCEDURE statement
OpenEdge Release 10.2B
|