Progress
DataServer
for ORACLE Guide


CLOSE STORED-PROCEDURE Statement

Retrieves the output parameter values from an ORACLE stored procedure and indicates that the procedure is finished.

SYNTAX

CLOSE STORED-PROC procedure [ integer-field = PROC-STATUS ]
  [ WHERE PROC-HANDLE = integer-variable ] 

procedure

The name of the stored procedure that you want to close.

integer-field = PROC-STATUS

The PROC-STATUS function returns the value of the return value from the ORACLE stored procedure.

WHERE PROC-HANDLE = integer-field

An integer whose value uniquely identifies the stored procedure that produces the results returning from the ORACLE database.

EXAMPLE

The 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 in the following example:

DEFINE VARIABLE st AS INTEGER INITIAL 0.
DEFINE VARIABLE h  AS INTEGER. 
RUN STORED-PROC p1 h = PROC-HANDLE NO-ERROR. 
CLOSE STORED-PROC p1 st = PROC-STATUS WHERE PROC-HANDLE = h.  
DISPLAY st. 
IF ERROR-STATUS:ERROR 
     THEN
   MESSAGE ERROR-STATUS:GET-MESSAGE(1) ERROR-STATUS:GET-NUMBER(1)
          VIEW-AS ALERT-BOX.  

NOTES

EXAMPLE

The PROC-STATUS clause of the CLOSE STORED-PROCEDURE statement allows the DataServer 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 in the following example:

DEFINE VARIABLE st AS INTEGER INITIAL 0.
DEFINE VARIABLE h  AS INTEGER. 
RUN STORED-PROC p1 h = PROC-HANDLE NO-ERROR. 
CLOSE STORED-PROC p1 st = PROC-STATUS WHERE PROC-HANDLE = h.  
DISPLAY st. 
IF ERROR-STATUS:ERROR 
     THEN
   MESSAGE ERROR-STATUS:GET-MESSAGE(1) ERROR-STATUS:GET-NUMBER(1)
          VIEW-AS ALERT-BOX.  

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