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.

RDBMS Stored Procedure Details<br />

3–8<br />

The following types of temp-tables can support result sets:<br />

• Static — A temp-table whose schema is defined at compile time.<br />

• Dynamic — A temp-table whose schema is defined at run time. There are two types of<br />

dynamic temp-tables: dynamic-prepared and dynamic-unprepared.<br />

For additional details about using the LOAD-RESULT-INTO phrase with the temp-table handle, see<br />

the “Loading result sets into temp-tables” section on page 3–21.<br />

PROC-STATUS phrase<br />

The PROC-STATUS phase returns the return status from a MS <strong>SQL</strong> <strong>Server</strong> stored procedure. The<br />

return status is an integer value that typically indicates whether a stored procedure succeeded<br />

or failed; if a stored procedure fails, a code indicates why it failed. See your <strong>Microsoft</strong> <strong>SQL</strong><br />

<strong>Server</strong> documentation <strong>for</strong> descriptions of the possible values <strong>for</strong> the return status.<br />

PROC-HANDLE phrase<br />

The PROC-HANDLE phrase allows you to specify a handle to act as a unique identifier <strong>for</strong> a MS<br />

<strong>SQL</strong> <strong>Data</strong><strong>Server</strong> stored procedure. For example, the PROC-HANDLE assigns a value to the<br />

specified integer field or variable (integer–field) that uniquely identifies the stored procedure<br />

that is returning results from MS <strong>SQL</strong> <strong>Server</strong>.<br />

Note these additional points about the PROC-HANDLE:<br />

• Progress Software Corporation recommends that you specify a procedure handle <strong>for</strong> each<br />

stored procedure that you run.<br />

• You do not have to specify a handle if there is only one active stored procedure and you<br />

do not include <strong>SQL</strong> statements in the <strong>OpenEdge</strong> application.<br />

NO-ERROR option<br />

The NO-ERROR option specifies that any ERROR condition that the RUN STORED–PROCEDURE<br />

statement produces is suppressed. Be<strong>for</strong>e you close a stored procedure, check the ERROR–STATUS<br />

handle <strong>for</strong> in<strong>for</strong>mation on any errors that occurred. You receive an error when you attempt to<br />

close a stored procedure that did not start.<br />

Note: This option must appear be<strong>for</strong>e any runtime parameter list.<br />

PARAM phrase<br />

The Param phrase identifies a run-time parameter to be passed to the stored procedure. A<br />

parameter has the following syntax:<br />

Syntax<br />

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

[INPUT|OUTPUT|INPUT-OUTPUT ][ PARAM parameter-name = ] expression )]

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

Saved successfully!

Ooh no, something went wrong!