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.

Contents<br />

Contents–2<br />

<strong>OpenEdge</strong> sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–15<br />

<strong>Data</strong> types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–17<br />

Working with unsupported data types . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–19<br />

Working with non-updatable data types . . . . . . . . . . . . . . . . . . . . . . . . . . 2–20<br />

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

<strong>Data</strong><strong>Server</strong> <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong> support <strong>for</strong> datetime data types . . . . . . . 2–21<br />

Using datetime data types in a WHERE clause . . . . . . . . . . . . . . . . . . . . 2–29<br />

Support <strong>for</strong> <strong>OpenEdge</strong> ABL BLOB data type . . . . . . . . . . . . . . . . . . . . . 2–30<br />

User-defined data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31<br />

Arrays. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31<br />

Unknown value (?) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31<br />

Zero-length character strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–32<br />

Record creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–33<br />

<strong>Data</strong> source record locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–36<br />

Share locks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–37<br />

Exclusive locks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–37<br />

Handling lock timeouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–37<br />

Additional record locking details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39<br />

NO–LOCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39<br />

Locking impact on queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39<br />

Locking examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–40<br />

The NO–WAIT option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–42<br />

Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–43<br />

Transaction scoping and buffer management . . . . . . . . . . . . . . . . . . . . . 2–43<br />

Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–45<br />

Overflow checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–47<br />

Cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–48<br />

Forward and backward scrolling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–48<br />

Block cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–49<br />

ABL issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–52<br />

ROWID function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–52<br />

RECID function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53<br />

DEFINE BROWSE statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54<br />

Field lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54<br />

FIND statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–56<br />

Compiling <strong>OpenEdge</strong> procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–57<br />

FOR statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–58<br />

Features and language differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–58<br />

RDBMS stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–60<br />

3. RDBMS Stored Procedure Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–1<br />

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2<br />

Defining native stored procedures to ABL . . . . . . . . . . . . . . . . . . . . . . . . 3–2<br />

RDBMS stored procedure basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–3<br />

Run Stored-Procedure details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–6<br />

Complete syntax reference <strong>for</strong> Run Stored-Procedure . . . . . . . . . . . . . . 3–6<br />

Run Stored-Procedure statement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–7<br />

Closed Stored-Procedure statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–9<br />

Run Stored-Proc statement execution<br />

without the LOAD-RESULT-INTO phrase . . . . . . . . . . . . . . . . . . . . 3–10<br />

Run Stored-Proc statement execution<br />

with the LOAD-RESULT-INTO phrase . . . . . . . . . . . . . . . . . . . . . . 3–11<br />

Run Stored-Proc statement execution using<br />

the send-sql-statement option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–11<br />

<strong>Data</strong> output and retrieval options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–13<br />

Return codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–13

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

Saved successfully!

Ooh no, something went wrong!