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.

Chapter 2: Initial Programming Considerations<br />

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

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

extend to the <strong>SQL</strong> server 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 />

ABL-to-MS <strong>SQL</strong> <strong>Server</strong> data type mapping<br />

The Map to MSS Datetime Type <strong>for</strong> option is disabled by default <strong>for</strong> BLOBs in order<br />

to provide backward compatibility, which means that the default behavior is to use the<br />

behavior from the previous release, mapping to the DATETIME data type, and not the<br />

new data types.<br />

Table 16 depicts mapping between the ABL BLOB data type and its MS <strong>SQL</strong> <strong>Server</strong><br />

equivalent during a schema pull.<br />

Table 16: BLOB data type in schema pull<br />

For more in<strong>for</strong>mation on ABL-to-MS <strong>SQL</strong> <strong>Server</strong> data type mapping, see Table 9.<br />

User-defined data types<br />

MS <strong>SQL</strong> <strong>Server</strong> allows you to define your own data types that map to native MS <strong>SQL</strong><br />

<strong>Server</strong> data types. When the <strong>Data</strong><strong>Server</strong> reads the schema in<strong>for</strong>mation <strong>for</strong> a<br />

user-defined data type, it reads the MS <strong>SQL</strong> <strong>Server</strong> base data type and maps it to the<br />

equivalent <strong>OpenEdge</strong> data type. Suppose, <strong>for</strong> example, that you create a data type<br />

named phone_number and map it to the char data type. In the schema holder, the<br />

<strong>Data</strong><strong>Server</strong> represents your phone_number data type as a CHARACTER data type. If you<br />

make any changes to a user-defined data type, you must update the schema holder to<br />

reflect those changes.<br />

Arrays<br />

MS <strong>SQL</strong> <strong>Server</strong> <strong>Data</strong> Type <strong>OpenEdge</strong> <strong>Data</strong> Type<br />

MSS 2005 MSS 2008 Prior to 11.0 11.0 and later<br />

VARBINARY(MAX) VARBINARY(MAX) CHAR CHAR, BLOB<br />

IMAGE IMAGE CHAR CHAR, BLOB<br />

VARBINARY(MAX)<br />

FILESTREAM<br />

Non-applicable BLOB<br />

The <strong>OpenEdge</strong> database allows you to define fields as arrays, also called field extents.<br />

The <strong>Data</strong><strong>Server</strong> interprets specially named data source columns of the same data type<br />

as an <strong>OpenEdge</strong> field with the same number of array elements. You name the data<br />

source columns column_name##1, column_name##2, and so <strong>for</strong>th, to correspond to an<br />

<strong>OpenEdge</strong> array named colunm_name. The <strong>Data</strong><strong>Server</strong> creates a single field definition<br />

in the schema holder <strong>for</strong> the field extents. See the “Migrating an <strong>OpenEdge</strong> database<br />

to MS <strong>SQL</strong> <strong>Server</strong>” section on page 293 <strong>for</strong> instructions on adding these columns<br />

automatically with the <strong>OpenEdge</strong> DB to MS <strong>SQL</strong> <strong>Server</strong> utility.<br />

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