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.

Initial Programming Considerations<br />

2–22<br />

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

column as well as three other datetime data types. Table 2–7 defines the MS <strong>SQL</strong> 2008 data<br />

types and identifies compatible ABL data types.<br />

Table 2–7: MS <strong>SQL</strong> <strong>Server</strong> 2008 datetime data types<br />

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

type Description<br />

DATE Provides day of the year based on the<br />

Gregorian calendar.<br />

TIME Provides time of day based on 24-hour<br />

clock.<br />

DATETIME2 Provides variable precision of up to 100<br />

nanoseconds.<br />

DATETIMEOFFSET Provides date and time data with time<br />

zone offset and variable precision of up<br />

to 100 nanoseconds.<br />

Compatible<br />

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

types<br />

DATE1 CHAR<br />

DATETIME 1,2<br />

DATETIME-TZ2 CHAR 1<br />

DATETIME 2<br />

DATE<br />

CHAR<br />

DATETIME1,2,3 DATETIME-TZ2,3 DATE<br />

CHAR<br />

DATETIME2,3 DATETIME-TZ 1,2,3<br />

1. Default data type mapping <strong>for</strong> this MS <strong>SQL</strong> <strong>Server</strong> data type.<br />

2. New MSS data types with a time component support fractional accuracy up to 100 nanoseconds. Hence, when we<br />

receive any time data from an <strong>OpenEdge</strong> datetime data type with a time component, the fractional portion of the<br />

time value greater than millisecond accuracy is dropped in the conversion. For example, a time value<br />

‘12:00:00.1235678’ in MS <strong>SQL</strong> <strong>Server</strong> would yield a resultant value of ’12:00:00.123’ in an <strong>OpenEdge</strong><br />

DATETIME column. NOTE: The time component is truncated rather than rounded in order to be consistent with<br />

MS <strong>SQL</strong> <strong>Server</strong> which also truncates the value when converting between two datetime data types defined with<br />

inconsistent fractional accuracy.<br />

3. ABL data type limits MSS data type accuracy to millisecond precision.<br />

Note: Date time related data types of MS <strong>SQL</strong> <strong>Server</strong> 2008 will work only with the <strong>SQL</strong><br />

Native Client 2008 (SNAC 10.0) driver and not with earlier native and non-native<br />

drivers, as earlier version drivers will not support 2008 date time data types.

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

Saved successfully!

Ooh no, something went wrong!