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.

Chapter 2: Initial Programming Considerations<br />

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

Mixing DATE, DATETIME, DATETIME-TZ in a WHERE clause or in other comparisons will<br />

cause compile time errors and are not valid comparisons.<br />

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

The <strong>Data</strong><strong>Server</strong> provides support <strong>for</strong> the <strong>OpenEdge</strong> ABL CLOB (Character Large<br />

Object) data type by mapping it to the equivalent data types in the MS <strong>SQL</strong> <strong>Server</strong>. This<br />

support is limited to MS <strong>SQL</strong> <strong>Server</strong> 2005 and later versions. The existing default and<br />

legacy mappings of server CLOB to the <strong>OpenEdge</strong> CHARACTER data type can be<br />

optionally replaced with <strong>OpenEdge</strong> CLOB mapping. <strong>OpenEdge</strong> CLOB mapping provides<br />

additional support <strong>for</strong> CLOB server types that are unavailable with CHARACTER<br />

mapping.You must keep in mind that CHAR-mapped columns that are replaced with<br />

CLOB mappings requires that the table in which the CLOB resides has a ROWID index<br />

designation.<br />

The ability to map to an <strong>OpenEdge</strong> CLOB data type enables you to:<br />

• Migrate an <strong>OpenEdge</strong> database with CLOB data type to an MS <strong>SQL</strong> <strong>Server</strong><br />

database as VARCHAR(MAX) or NVARCHAR(MAX) and to pull data back as a CLOB<br />

date type into the schema holder. For more in<strong>for</strong>mation on enabling the CLOB data<br />

type during a schema migration, see the “Migrating an <strong>OpenEdge</strong> database to MS<br />

<strong>SQL</strong> <strong>Server</strong>” section on page 293.<br />

• Pull MS <strong>SQL</strong> <strong>Server</strong> VARCHAR(MAX), NVARCHAR(MAX),TEXT, or NTEXT data types<br />

as an <strong>OpenEdge</strong> CLOB data type into the schema holder by using the Default to<br />

<strong>OpenEdge</strong> LOB option.<br />

• Read and write LOB data of any encoding, including UNICODE, from or to an MS<br />

<strong>SQL</strong> <strong>Server</strong> database that is CLOB-enabled by using <strong>OpenEdge</strong> ABL ASSIGN or<br />

COPY-LOB operations.<br />

• Pass a CLOB as an INPUT or an OUTPUT parameter to the stored procedure. You<br />

can use the <strong>OpenEdge</strong> MEMPTR and LONGCHAR data types as parameters to RUN<br />

STORED-PROCEDURE operation to map BLOB and CLOB server types,<br />

respectively. For more in<strong>for</strong>mation on RDBMS Stored Procedure Details, see<br />

Chapter 3, “RDBMS Stored Procedure Details”.<br />

Note: RUN STORED-PROCEDURE is not referred as an RDBMS transaction. It<br />

is a part of a transaction but is not in itself inherently a transaction. The<br />

ability to pass LOB parameters does not give you the ability to run stored<br />

procedures.<br />

Note: <strong>OpenEdge</strong> provides partial read/write capability to BLOB and CLOB data types<br />

using STARTING AT, FOR, and OVERLAY AT operations. This capability does not<br />

extend to the MS <strong>SQL</strong> <strong>Server</strong> legacy native data types, TEXT and IMAGE.<br />

For more in<strong>for</strong>mation, on using the ASSIGN and COPY-LOB statements, see <strong>OpenEdge</strong><br />

Development: ABL Reference.<br />

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