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–5: MS <strong>SQL</strong> <strong>Server</strong> data type equivalents in <strong>OpenEdge</strong> (3 of 3)<br />

image 2 CHARACTER<br />

bit LOGICAL<br />

timestamp CHARACTER 5<br />

identity<br />

uniqueidentifier<br />

Depends on underlying type 5<br />

CHARACTER 5<br />

computed columns Depends on underlying type<br />

cursor<br />

Not supported 6<br />

sql_variant Not supported<br />

geometry Not supported<br />

geography Not supported<br />

hierarchyid Not supported<br />

Working with unsupported data types<br />

You can read data from tables containing unsupported data types by using two possible<br />

workarounds – first, by creating a view or, secondly, by using a stored procedure.<br />

<strong>Data</strong> types<br />

MS <strong>SQL</strong> <strong>Server</strong> data type <strong>OpenEdge</strong> data type equivalent 1<br />

1. The initial entry identifies the default data type. <strong>Data</strong> types in parentheses identify supported options.<br />

2. Starting in MS <strong>SQL</strong> <strong>Server</strong> 2005, "image" and "text" LOB types on the server can be expressed as<br />

"varbinary/(n)varchar(max)" types respectively. While still supported, Progress recommends legacy LOB types be<br />

converted to "var(max)" types <strong>for</strong> better <strong>for</strong>ward compatibility.<br />

3. The default CHARACTER mapping <strong>for</strong> binary LOB server types can be changed to <strong>OpenEdge</strong> BLOB by selecting<br />

the "Default to <strong>OpenEdge</strong> LOB" checkbox during object selection on a schema pull. WARNING: CHARACTER<br />

and LOB columns are handled differently in <strong>OpenEdge</strong>. Code changes are required in your application if you to<br />

re-map a server column to an <strong>OpenEdge</strong> BLOB that had previously been mapped to a CHARACTER field.<br />

4. Starting in MS <strong>SQL</strong> <strong>Server</strong> 2008 using native drivers, these data types can be pulled into an <strong>OpenEdge</strong> schema<br />

holder <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong>.<br />

5. These non-updatable columns can be mapped into an MSS <strong>Data</strong><strong>Server</strong> schema holder but cannot be written to on<br />

the server.<br />

6. For more in<strong>for</strong>mation on unsupported data types, see the “Working with unsupported data types” section on<br />

page 2–19.<br />

To use the first workaround, create a view in the <strong>SQL</strong> <strong>Server</strong> database that excludes the<br />

unsupported column so that only supported data types are available. For more in<strong>for</strong>mation on<br />

views, see the “MS <strong>SQL</strong> <strong>Server</strong> data source views” section on page 2–13.<br />

To use the second workaround, write your own stored procedure with the RUN STORED<br />

PROCEDURE statement or write <strong>SQL</strong> into a SEND-<strong>SQL</strong>-STATEMENT stored procedure call that<br />

expresses <strong>Data</strong> Manipulation Language (DML) adequate to handle the table object without the<br />

unsupported types. You can omit the unsupported data type in your DML statements such that<br />

they are not returned in the result set or are CAST to data types that are supported. For more<br />

in<strong>for</strong>mation on stored procedures, see Chapter 3, “RDBMS Stored Procedure Details.”<br />

2–19

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

Saved successfully!

Ooh no, something went wrong!