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.

Appendix C: <strong>Data</strong> Type Details<br />

7. When you define a binary or char column to allow nulls, MSS stores the data type definitions as<br />

varbinary and varchar respectively. This does not affect how the <strong>Data</strong><strong>Server</strong> maps the MSS data<br />

types to <strong>OpenEdge</strong> data types.<br />

8. When migrating an <strong>OpenEdge</strong> database to <strong>SQL</strong> <strong>Server</strong>, character fields whose <strong>for</strong>mat is less than x(8000)<br />

are defined as VARCHAR by default if “ABL <strong>for</strong>mat” is used <strong>for</strong> field widths during migration. Fields whose<br />

<strong>SQL</strong> widths are less than 8000 are defined as varchar by default if “width” is used <strong>for</strong> fields widths during<br />

migration, and larger character fields are defined as VARCHAR(MAX). When the database uses unicode<br />

data types, the 800 byte record limit in <strong>SQL</strong> <strong>Server</strong> must be expressed in 4000 characters, so the above<br />

limits are halved <strong>for</strong> unicode data.<br />

If there are several large character fields in one record that each individually fall under the maximum size<br />

limits so as to be defined as varchar, but in sum, exceed the maximum record size <strong>for</strong> <strong>SQL</strong> server, it will<br />

be necessary to define the fields as a server CLOB type, such as varchar(max) in order to successfully<br />

create the records.<br />

The default server type mapping <strong>for</strong> character data that exceeds the <strong>SQL</strong> <strong>Server</strong> record size limit is<br />

changed from Text/ntext to varchar(max)/nvarchar(max) in <strong>SQL</strong> <strong>Server</strong> 2005 and later.<br />

9. The amount of data that can be accessed in a field defined to be CHARACTER by an <strong>OpenEdge</strong> application<br />

is limited by the maximum size of a record that can be passed to the client. The maximum record size <strong>for</strong><br />

<strong>Data</strong><strong>Server</strong> applications is 30,000 bytes. Keep this in mind if you decide to map server CLOB type to<br />

CHARACTER rather than CLOB. If you map server LOB data to CHARACTER data types but you don’t<br />

process the data in these fields on the returned records, it is recommended that you construct field lists<br />

to exclude them from your query results.<br />

10. By default, the initial value of a MS <strong>SQL</strong> <strong>Server</strong> datetime or smalldatetime column is the Unknown value<br />

(?). The default initial values <strong>for</strong> binary and varbinary are also the Unknown value (?). The MS <strong>SQL</strong><br />

<strong>Server</strong> datetime and smalldatetime data types contain both date and time in<strong>for</strong>mation. The <strong>Data</strong><strong>Server</strong><br />

maps these to the <strong>OpenEdge</strong> DATE data type; however, you can change the DATE data type to<br />

CHARACTER in the schema holder. If you do this, remember to change the <strong>for</strong>mat to match the new data<br />

type. For example, if you change the data type to CHARACTER, specify a character <strong>for</strong>mat, such as x(26).<br />

11. When mapping of the MS <strong>SQL</strong> <strong>Server</strong> datetime or smalldatetime data types is to the <strong>OpenEdge</strong> DATE<br />

data type, <strong>OpenEdge</strong> truncates the time portion of the date.<br />

12. The <strong>Data</strong><strong>Server</strong> considers this data type to be a hidden value. Its value is set by the server rather than<br />

the application. However, you can still access a MS <strong>SQL</strong> <strong>Server</strong> table that contains this type of column.<br />

13. Identity columns are limited by <strong>SQL</strong> <strong>Server</strong> to one per table. The PROGRESS_RECID identity column<br />

can be auto-generated in a migrated table in order to represent ROWID <strong>for</strong> <strong>OpenEdge</strong> <strong>for</strong> that table. Your<br />

<strong>SQL</strong> <strong>Server</strong> table can define an alternative identity column but a user-defined identity column cannot be<br />

used like PROGRESS_RECID to represent ROWID. See the “ROWID function” section on page 121 <strong>for</strong><br />

more in<strong>for</strong>mation.<br />

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