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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3: RDBMS Stored Procedure Details<br />

Run Stored-Procedure details<br />

This section provides:<br />

• A complete, detailed reference <strong>for</strong> all the syntax expressions and options you can<br />

use to define the RUN STORED-PROCEDURE and the associated language elements<br />

that comprise a stored procedure definition.<br />

• Syntax to use the RUN STORED-PROCEDURE statement with and without the<br />

LOAD-RESULT-INTO phrase.<br />

• Detailed in<strong>for</strong>mation about using the RUN STORED-PROCEDURE statement with the<br />

send-sql option. Examples to use the RUN STORED-PROCEDURE statement with and<br />

without the LOAD-RESULT-INTO phrase are provided.<br />

Complete syntax reference <strong>for</strong> Run Stored-Procedure<br />

The following syntax shows the RUN STORED-PROC statement and all options that can<br />

be used with the statement:<br />

Syntax<br />

RUN STORED-PROCEDURE procedure-name<br />

[[LOAD-RESULT-INTO [ = PROC-STATUS]] |<br />

[ = PROC-HANDLE]]<br />

[ NO-ERROR ]<br />

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

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

However, keep in mind that not all options shown can be used simultaneously.<br />

Note: In the RUN STORED-PROCEDURE syntax, note that the is either a pure<br />

handle or a handle that points to a temp-table. For more in<strong>for</strong>mation about the<br />

use of temp-table handle with the LOAD-RESULT-INTO phrase, see the<br />

“LOAD-RESULT-INTO phrase” section on page 125.<br />

Syntax<br />

CLOSE STORED-PROCEDURE procedure-name<br />

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

[ WHERE PROC-HANDLE = integer-field ]<br />

The CLOSE STORED-PROCEDURE is not used when the LOAD-RESULT-INTO keyword is used<br />

with the RUN-STORED-PROCEDURE statement. See the “Closed Stored-Procedure<br />

statement” section on page 127.<br />

For valid combinations and usage of these syntax elements see the:<br />

• “Run Stored-Proc statement execution without the LOAD-RESULT-INTO phrase”<br />

section on page 128<br />

124 <strong>OpenEdge</strong> <strong>Data</strong> <strong>Management</strong>: <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong>

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

Saved successfully!

Ooh no, something went wrong!