Sybase date and time datatypes are now supported in ECDA for Oracle previously known as DirectConnect for Oracle (DCO). The following sections describe how DCO supports the new datatypes:
Datatype mapping
Incoming data
Outgoing data
Oracle currently provides two date/time datatypes, Oracle DATE and Oracle TIMESTAMP:
The Oracle DATE datatype can have both a date portion and a time portion, in which the precision of the time portion is at the seconds level. The Sybase DATE datatype maps to the existing Oracle DATE datatype.
The Oracle TIMESTAMP datatype can have both a date portion and a time portion in which the precision of the time portion includes fractional seconds at the macro level. The Sybase TIME datatype maps to the existing Oracle TIMESTAMP datatype.
Cursor and dynamic statement parameter data for Sybase DATE and TIME datatypes are converted to the proper Oracle datatype. The Sybase TIME data destined for an Oracle TIMESTAMP column is converted based on the setting of the timestamp_ms_support parameter. Incoming language statements with literal string data that is destined for either an Oracle DATE or TIMESTAMP column must conform to the format defined by the date_format and timestamp_format configuration settings. This implies that column data coming from a Sybase DATE column must include a default time of 12:00:00AM, in addition to the date value. The column data coming from a Sybase TIME column must include a default date of Jan 1 1900 in addition to the time value. Incoming RPC statements with Sybase DATE or TIME literal string parameters must format the literal string.
Data being retrieved from both Oracle DATE and TIMESTAMP is returned to the application as a date/time datatype.