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.

Table 2–12 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 2–12: BLOB data type in schema pull<br />

User-defined data types<br />

<strong>Data</strong> 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> <strong>Server</strong><br />

data types. When the <strong>Data</strong><strong>Server</strong> reads the schema in<strong>for</strong>mation <strong>for</strong> a user-defined data type, it<br />

reads the MS <strong>SQL</strong> <strong>Server</strong> base data type and maps it to the equivalent <strong>OpenEdge</strong> data type.<br />

Suppose, <strong>for</strong> example, that you create a data type named phone_number and map it to the char<br />

data type. In the schema holder, the <strong>Data</strong><strong>Server</strong> represents your phone_number data type as a<br />

CHARACTER data type. If you make any changes to a user-defined data type, you must update the<br />

schema holder to 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 10.2B 10.2B and later<br />

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

IMAGE IMAGE CHAR CHAR, BLOB<br />

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

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

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

column_name##1, column_name##2, and so <strong>for</strong>th, to correspond to an <strong>OpenEdge</strong> array named<br />

colunm_name. The <strong>Data</strong><strong>Server</strong> creates a single field definition in the schema holder <strong>for</strong> the field<br />

extents. See the “Migrating an <strong>OpenEdge</strong> database to MS <strong>SQL</strong> <strong>Server</strong>” section on page 7–20<br />

<strong>for</strong> instructions on adding these columns automatically with the <strong>OpenEdge</strong> DB to MS <strong>SQL</strong><br />

<strong>Server</strong> utility.<br />

Unknown value (?)<br />

VARBINARY(MAX)<br />

VARBINARY(MAX)<br />

FILESTREAM<br />

The <strong>Data</strong><strong>Server</strong> supports null values. Procedures that use a null value behave exactly as they do<br />

when accessing an Unknown value (?) in an <strong>OpenEdge</strong> database, except <strong>for</strong> one<br />

difference—you cannot compare a field to the Unknown value (?) if the field is not allowed to<br />

hold the Unknown value (?) (i.e., is not null-capable). For example, if the custnum field is not<br />

null-capable, the following statement fails at run time:<br />

FIND customer WHERE customer.custnum NE ?<br />

Non-applicable<br />

BLOB<br />

A column that is not null-capable is marked “mandatory” in the schema holder.<br />

2–31

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

Saved successfully!

Ooh no, something went wrong!