CLOSE STORED-PROCEDURE statement
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
CLOSE STORED-PROCEDURE statement
For a non-Progress stored procedure, PROC-STATUS indicates that the procedure has completed execution and retrieves
any return status. For a send-sql-statement stored
procedure, CLOSE STORED-PROCEDURE marks the stored
procedure handle "reusable" and does not close the SQL cursor associated with the proc
handle. When we get subsequent RUN STORED-PROC request, DataServer reuses the proc-handle if
the SQL statement matches the existing statement in the cache. if not, it allocates a new
proc-handle.
|
- procedure-name
- The name of the stored procedure that you want to close or the built-in procedure
name,
send-sql-statement - integer-field = PROC-STATUS
- Assigns the return value from a stored procedure to the specified integer field or variable (integer-field).
- WHERE PROC-HANDLE = integer-field
- An integer field or variable whose value uniquely identifies the stored procedure that
produces the results returned from the data source or the SQL cursor of a
send-sql-statementstored procedure.
Consider these points concerning the CLOSED STORED-PROCEDURE
statement:
- If you specified a
PROC-HANDLEwhen you ran a stored procedure, you must specify thePROC-HANDLEwhen you close the stored procedure. - If you do not specify a
PROC-HANDLE, theCLOSE STORED-PROCEDUREstatement closes the procedure if there is only one stored procedure running. If there is more than one stored procedure running, an error is returned.