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.

Chapter 3: RDBMS Stored Procedure Details<br />

<strong>Data</strong> output and retrieval options<br />

This section briefly highlights the data retrieval options that you can initiate through the<br />

execution of a stored procedure. See the “Interfacing with RDBMS stored procedures”<br />

section on page 134 <strong>for</strong> more in<strong>for</strong>mation and examples of each option.<br />

Return codes<br />

This value might be a success code or a value returned by the stored procedure (as<br />

defined by the data source).<br />

Values of output parameters defined when creating a<br />

procedure<br />

When you call a stored procedure, you can specify the ordered list of positional<br />

parameters, or you can name them individually. To retrieve output parameter values<br />

from a stored procedure, request them with the keyword OUTPUT or INPUT-OUTPUT<br />

when you execute the procedure; your selected INPUT and OUTPUT parameter options<br />

must match the corresponding signature of the stored procedure at the data source.<br />

Results retrieved from a database<br />

This section identifies and briefly defines three coding techniques that ABL supports to<br />

retrieve data source results. In general, you can think of these techniques as handling<br />

complex query results <strong>for</strong> which each technique has its own purpose and benefits.<br />

Using the <strong>OpenEdge</strong>-supplied proc-text-buffer <strong>for</strong> row results<br />

This technique:<br />

• Allows you to access result sets available through a pseudo table <strong>for</strong> which each<br />

row is a long character string<br />

• Requires you to parse each long string to access specific fields<br />

The Proc-text-buffer is part of the schema holder, making this result set option<br />

independent of the <strong>for</strong>eign data source.<br />

Defining a special view on the MS <strong>SQL</strong> <strong>Server</strong> data source to use as a buffer <strong>for</strong><br />

row results<br />

This technique allows you to:<br />

• Define views within the <strong>for</strong>eign data source<br />

• Use the result set buffer configuration of the view to access the data returned by<br />

the stored procedure<br />

Defining of a special view involves some administration on the <strong>for</strong>eign datasource and<br />

there<strong>for</strong>e is considered a result set option that is dependent on the <strong>for</strong>eign data source.<br />

132 <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!