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.

Loading results into a temp-table<br />

This technique allows you to:<br />

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

• Specify one or more temp-table handle elements to retrieve stored procedure<br />

result sets and have the <strong>Data</strong><strong>Server</strong> load the result set data directly into the<br />

associated temp-tables<br />

• Have direct access to the fields defined in the temp-table<br />

The temp-table approach maintains some separation between the data and the <strong>for</strong>eign<br />

data source which allows you to process the result sets quite independent of its<br />

database origin. Also, the result set definition is not contained within the schema<br />

holder.<br />

Unless you pass unprepared dynamic temp-table handles into which the result sets are<br />

to be loaded, you still need to ensure that the temp-table record definition matches that<br />

of the stored procedures result set(s).<br />

Passing empty temp-tables with the LOAD-RESULT-INTO phrase generates temp-table<br />

definitions dynamically based on a default mapping of data types. This method<br />

provides a data retrieval method completely independent of the <strong>for</strong>eign data source.<br />

The LOAD-RESULT-INTO method represents a highly efficient means to transfer stored<br />

procedure result sets into temp-tables and provides significant per<strong>for</strong>mance gains over<br />

other techniques used to accomplish this same goal.<br />

Note: The proc-text-buffer and the special native views techniques use the basic<br />

RUN STORED-PROC statement and are backward compatible to earlier versions<br />

of ABL. The LOAD-RESULT-INTO phrase provides a new technique to populate<br />

temp-tables directly in ABL.<br />

<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> 133

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

Saved successfully!

Ooh no, something went wrong!