Open System Services ODBC/MX Client Driver Manual for SQL/MX Release 3.2.1 (H06.26+, J06.15+)

SQL Datetime Retrieval property
The SQL Datetime Retrieval specifies how the SQL/MP Datetime data type is retrieved from
the ODBC/MX driver. The SQL Datetime Retrieval has two values:
SYSTEM_DEFAULT Year is set to 0001.
MSDN_DEFAULT Year is set to 1900.
If not specified, the default is SYSTEM_DEFAULT. This property is applicable only when SQL/MP
Datetime datatype is bound to SQL/MX datatypes such as DATE or TIMESTAMP.
Set the SQL Datetime Retrieval property using the ODBCDSN property.
If the value of SQL Datetime Retrieval is set to SYSTEM_DEFAULT, the behavior of the
driver is same as in earlier releases of SQL/MX.
For example,
1. Create a table in SQL/MP with Datetime column as month to day.
2. Insert the data “12–31” into the created table using SQL/MX or SQL/MP.
3. Retrieve the data from the SQL/MP Datetime datatype month to day column from
ODBC/MX driver by binding to DATE. The retrieved value is 0001-12-31.
If the value of SQL Datetime Retrieval is set to MSDN_DEFAULT, there is a change in
the behavior of the driver when compared to earlier releases of SQL/MX.
For example,
1. Create a table in SQL/MP with Datetime column as month to day.
2. Insert the data “12–31” into the created table using SQL/MX or SQL/MP.
3. Retrieve the data from the SQL/MP Datetime datatype month to day column from
ODBC/MX driver by binding to DATE. The retrieved value is 1900-12-31.
48 ODBC/MX Conformance