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.

Contents<br />

Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69<br />

<strong>OpenEdge</strong> sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69<br />

<strong>Data</strong> types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71<br />

Working with unsupported data types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

Working with non-updatable data types . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

Processing considerations <strong>for</strong> 32-bit and 64-bit data types . . . . . . . . . . . . 74<br />

<strong>Data</strong><strong>Server</strong> <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong> support <strong>for</strong> datetime data types . . . . . . . . 76<br />

Using datetime data types in a WHERE clause . . . . . . . . . . . . . . . . . . . . . 86<br />

Support <strong>for</strong> <strong>OpenEdge</strong> ABL CLOB data type . . . . . . . . . . . . . . . . . . . . . . . 86<br />

Support <strong>for</strong> <strong>OpenEdge</strong> ABL BLOB data type . . . . . . . . . . . . . . . . . . . . . . . 87<br />

User-defined data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88<br />

Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88<br />

Unknown value (?) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89<br />

Zero-length character strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89<br />

Record creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90<br />

<strong>Data</strong> source record locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93<br />

Share locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94<br />

Exclusive locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94<br />

Handling lock timeouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br />

Additional record locking details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96<br />

NO–LOCK. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96<br />

Locking impact on queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />

Locking examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />

The NO–WAIT option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99<br />

Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100<br />

Transaction scoping and buffer management. . . . . . . . . . . . . . . . . . . . . . . 100<br />

Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102<br />

Overflow checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104<br />

Cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105<br />

Forward and backward scrolling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105<br />

Block cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106<br />

ABL issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110<br />

ROWID function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110<br />

RECID function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111<br />

DEFINE BROWSE statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112<br />

Field lists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112<br />

FIND statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114<br />

Compiling <strong>OpenEdge</strong> procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />

FOR statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

Features and language differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

RDBMS stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br />

3. RDBMS Stored Procedure Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br />

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120<br />

Defining native stored procedures to ABL . . . . . . . . . . . . . . . . . . . . . . . . . 120<br />

RDBMS stored procedure basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121<br />

Run Stored-Procedure details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124<br />

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

Run Stored-Procedure statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br />

Closed Stored-Procedure statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />

Run Stored-Proc statement execution<br />

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

Run Stored-Proc statement execution<br />

with the LOAD-RESULT-INTO phrase . . . . . . . . . . . . . . . . . . . . . . . 129<br />

Run Stored-Proc statement execution<br />

using the send-sql-statement option. . . . . . . . . . . . . . . . . . . . . . . . . . 129<br />

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