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

<strong>Data</strong><strong>Server</strong> <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong> support <strong>for</strong> datetime data<br />

types<br />

<strong>OpenEdge</strong> <strong>Data</strong><strong>Server</strong> <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong> supports DATETIME data types in MS <strong>SQL</strong><br />

<strong>Server</strong> up to <strong>SQL</strong> <strong>Server</strong> 2008 with full support <strong>for</strong> the ABL DATETIME-TZ data type.<br />

Working with MS <strong>SQL</strong> <strong>Server</strong> and ABL datetime data types<br />

Table 10 defines the MS <strong>SQL</strong> <strong>Server</strong> 2000, 2005 and 2008 data types and identifies<br />

compatible ABL data types.<br />

Table 10: MS <strong>SQL</strong> <strong>Server</strong> 2000 and 2005 datetime data types<br />

MS <strong>SQL</strong> <strong>Server</strong> data<br />

type Description<br />

DATETIME Provides date and time data to an<br />

accuracy of one three-hundredth of<br />

a second (equivalent to 3.33<br />

milliseconds or 0.00333 seconds).<br />

Values are rounded to increments of<br />

.000, .003, or .007.<br />

SMALLDATETIME<br />

Provides date and time data with<br />

accuracy to the minute.<br />

Compatible<br />

<strong>OpenEdge</strong> data<br />

types<br />

DATE 1<br />

CHAR<br />

DATETIME 2,3<br />

DATETIME-TZ 3<br />

DATE 1<br />

CHAR<br />

DATETIME 2,4<br />

DATETIME-TZ 4<br />

1. Default, compatible data type to which the native type can be converted.<br />

2. Check the Default to <strong>OpenEdge</strong> DATETIME option from Pre-Selection Criteria For Schema Pull on<br />

the Update/Add Table Definitions dialog to get this data type instead of the default.<br />

3. When converting <strong>OpenEdge</strong> DateTime/TZ data types to the legacy MS <strong>SQL</strong> <strong>Server</strong> DateTime data<br />

type, the same 3.33 millisecond accuracy that <strong>SQL</strong> <strong>Server</strong> uses is applied to <strong>OpenEdge</strong> values with<br />

millisecond precision. This means that .989, .990 and .991 round to .990, .992, .993 and .994 round to<br />

.993, .995, .996, .997 and .998 round to .997 and .999 rounds up to 1.000.<br />

4. When converting <strong>OpenEdge</strong> DateTime/TZ data types to the legacy MS <strong>SQL</strong> <strong>Server</strong> SmallDateTime<br />

data type, the same minute accuracy that <strong>SQL</strong> <strong>Server</strong> uses is applied to <strong>OpenEdge</strong> values to with<br />

second or greater precision. This means that seconds values up to 29.998 seconds will round down to<br />

zero and values from 29.999 seconds and up will round up to the next minute.<br />

Beginning in <strong>OpenEdge</strong> Release 10.2B, the <strong>Data</strong><strong>Server</strong> <strong>for</strong> MS <strong>SQL</strong> <strong>Server</strong> supports<br />

mappings of MS <strong>SQL</strong> <strong>Server</strong> datetime data types DATETIME and SMALLDATETIME to<br />

<strong>OpenEdge</strong> data type DATETIME-TZ along with the compatible <strong>OpenEdge</strong> types listed in<br />

Table 9.<br />

MS <strong>SQL</strong> <strong>Server</strong> 2008 offers the DATETIMEOFFSET data type to support time zones in a<br />

datetime column as well as three other datetime data types. Table 11 defines the MS<br />

<strong>SQL</strong> 2008 data types and identifies compatible ABL data types.<br />

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