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.

Examples<br />

Contents<br />

Example 1: Passing a SELECT statement as a parameter . . . . . . . . . . . . . . . . . . . . 130<br />

Example 2: Using the send-sql-statement with the LOAD-RESULT-INTO option . . . 130<br />

Example 3: A stored procedure with multiple result sets,<br />

output parameters, and a single return value . . . . . . . . . . . . . . . . . . . . . 134<br />

Example 4: Return status example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135<br />

Example 5: Passing parameters by name using the PARAM option . . . . . . . . . . . . . 135<br />

Example 6: pcust stored procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136<br />

Example 7: Returning database results into the proc-text-buffer<br />

and results conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136<br />

Example 8: First view created in your MS <strong>SQL</strong> <strong>Server</strong> data source . . . . . . . . . . . . . 138<br />

Example 9: Second view created in your MS <strong>SQL</strong> <strong>Server</strong> data source . . . . . . . . . . . 138<br />

Example 10: Result set of pcust - typed buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139<br />

Example 11: Procedure handles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140<br />

Example 12: Joining stored procedure results with other database tables . . . . . . . . . 140<br />

Example 13: RUN STORED-PROC statement with<br />

the LOAD-RESULT-INTO phrase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142<br />

Example 14: Multiple temp-tables in a prepared state . . . . . . . . . . . . . . . . . . . . . . . . . 146<br />

Example 15: Temp-table code technique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147<br />

Example 16: Basic execution of a stored procedure<br />

using LOAD-RESULT-INTO functionality . . . . . . . . . . . . . . . . . . . . . . . . 147<br />

Example 17: Using an existing dynamic temp-table<br />

without the TEMP-TABLE-PREPARE ( ) method . . . . . . . . . . . . . . . . . . 147<br />

Example 18: Using an existing dynamic temp-table<br />

with the TEMP-TABLE-PREPARE ( ) method . . . . . . . . . . . . . . . . . . . . 148<br />

Example 19: Calling a stored procedure and using the EXTENT phrase . . . . . . . . . . 149<br />

Example 20: Calling an enhanced stored procedure<br />

with a single temp table and the send-sql-statement . . . . . . . . . . . . . . . 149<br />

Example 21: Use of a PROC-STATUS phrase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150<br />

Example 22: Trapping errors within a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151<br />

Example 23: Trapping errors using LOAD-RESULT-INTO . . . . . . . . . . . . . . . . . . . . . 151<br />

Example 24: Expected ABL behavior—ROWID value of a temp-table buffer . . . . . . . 154<br />

Example 25: ABL Query filling a Pro<strong>Data</strong>Set temp-table . . . . . . . . . . . . . . . . . . . . . . . 155<br />

Example 26: Using the LOAD-RESULT-INTO technique<br />

to populate the underlying Temp-Table of a Pro<strong>Data</strong>Set . . . . . . . . . . . . 156<br />

Example 27: Use the LOAD-RESULT-INTO technique<br />

with BEFORE-FILL method to fill the temp-table(s) of a Pro<strong>Data</strong>Set . . . 158<br />

Example 28: Using PRGRS_LOG_ABL switch to log ABL to <strong>SQL</strong> correlation . . . . . . 241<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> 11

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

Saved successfully!

Ooh no, something went wrong!