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 />

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

on page 74.<br />

Working with unsupported data types<br />

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

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

procedure.<br />

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

the unsupported column so that only supported data types are available. For more<br />

in<strong>for</strong>mation on views, see the “MS <strong>SQL</strong> <strong>Server</strong> data source views” section on page 68.<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<br />

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

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

statements such that they are not returned in the result set or are CAST to data types<br />

that are supported. For more in<strong>for</strong>mation on stored procedures, see Chapter 3,<br />

“RDBMS Stored Procedure Details.”<br />

Working with non-updatable data types<br />

Because non-updatable columns can be read, they can also be dumped to a .d data<br />

file. But, these .d data files cannot be loaded with the load .d utility because of their<br />

non-updatable column status. The non-updatable values are applied by the server and<br />

there<strong>for</strong>e cannot be retained from the client. Use <strong>for</strong>eign database tools to dump and<br />

load tables with non-updatable columns that are controlled by the server. Alternatively,<br />

write a program to read data from your .d data file with non-updatable types into a<br />

temp table omitting the non-updatable columns using the EXCEPT phrase when you<br />

write them.<br />

Processing considerations <strong>for</strong> 32-bit and 64-bit data<br />

types<br />

Starting with <strong>OpenEdge</strong> Release 10.1B, <strong>Data</strong><strong>Server</strong> <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong> supports an<br />

existing or new 32-bit INTEGER data type defined in ABL. However, the internal bit size<br />

<strong>for</strong> an INTEGER data type and ROWID will automatically expand from a 32-bit field size to<br />

a 64-bit field size to accommodate larger values. In most situations, this expansion also<br />

supports the option to convert a database column from a 32-bit INTEGER to a 64-bit<br />

INT64 without per<strong>for</strong>ming a dump and load. For more details about ROWIDs, see the<br />

“ROWID function” section on page 110. Also, refer to the following sources <strong>for</strong><br />

additional language details about INT64 and ROWID:<br />

• Release 10 4GL <strong>Data</strong> Types Web paper available at the Web paper category of<br />

the PSDN Web site located at<br />

http://communities.progress.com/pcom/community/psdn.<br />

• <strong>OpenEdge</strong> Development: ABL Reference<br />

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