13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RDBMS Stored Procedure Details<br />

3–10<br />

Run Stored-Proc statement execution without the<br />

LOAD-RESULT-INTO phrase<br />

To implement most data retrieval options associated with a stored procedure, (excluding those<br />

that involve loading retrieved data into temp-tables) you must define the RUN STORED-PROC<br />

statement and explicitly end the stored procedure using the CLOSE STORED-PROC statement.<br />

You must define the RUN STORED-PROC and explicitly complete access to the stored procedure<br />

OUTPUT with the CLOSE STORED-PROC syntax expressions <strong>for</strong> a stored procedure implementation<br />

that retrieves the following types of data from the <strong>for</strong>eign data source:<br />

• proc-text-buffer<br />

• user-defined views<br />

For more in<strong>for</strong>mation about these data retrieval options, see the “<strong>Data</strong> output and retrieval<br />

options” section on page 3–13.<br />

Note: You can also implicitly or explicitly close a stored procedure to retrieve these types of<br />

data: return code or output parameters. For more in<strong>for</strong>mation about each of these data<br />

retrieval options, see the “<strong>Data</strong> output and retrieval options” section on page 3–13.<br />

The syntax details presented in this section describe how to run and close a stored procedure in<br />

the MS <strong>SQL</strong> <strong>Server</strong> data source.<br />

This is the syntax <strong>for</strong> the RUN STORED-PROC statement to execute an RDBMS stored procedure<br />

without the LOAD-RESULT-INTO phrase:<br />

Syntax<br />

RUN STORED-PROC procedure [ = PROC-HANDLE]<br />

[ NO-ERROR ]<br />

[([INPUT|OUTPUT|INPUT OUTPUT] [PARAM parameter-name =]expression, ...<br />

[INPUT|OUTPUT|INPUT OUTPUT] [PARAM parameter-name =]expression )]<br />

This type of syntax expression requires the explicit CLOSE STORED–PROC statement. This is the<br />

partial syntax <strong>for</strong> the CLOSE STORED–PROC statement:<br />

Syntax<br />

CLOSE STORED-PROC procedure<br />

[ integer-field = PROC-STATUS ]<br />

[ WHERE PROC-HANDLE = integer-field ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!