Progress
DataServer for
Microsoft SQL Server
Guide
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 closes the SQL cursor used by the procedure.
SYNTAX
procedure
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–statement stored procedure.
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 closes the procedure if there is only one stored procedure running. If there is more than one stored procedure running, an error is 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:
SEE ALSO
PROC–HANDLE Function, PROC–STATUS Function, RUN STORED–PROCEDURE Statement
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |