The Strategy ODBC Driver for Informix Wire Protocol is shipped with Strategy products to facilitate connectivity to Informix Dynamic Server 9.x, 10.x and 11.x. This driver does not require the Informix client layer for its functioning. When attempting to insert a Date field of the format YYYY/MM/DD while using this driver, the following error message appears:
ODBC Error S1000: -1204.
The Informix error code -1204 represents the following error message:
-1204 Invalid year in date.
This error message does not occur if the date format is MM/DD/YYYY, which is the default date format set on the Informix database side.
The same behavior occurs with the native Informix driver (for example, Informix driver version 3.82.00.11811) or with the Strategy ODBC Driver for Informix XPS. That is, attempting to insert a Date field of the format YYYY/MM/DD results in an error message while the date format MM/DD/YYYY is accepted. However, these drivers can be made to accept the date format YYYY/MM/DD by either altering the DBDATE parameter on the Informix client side or by setting the appropriate date format on the Informix server side. For more details on altering the DBDATE parameter on the Informix client side, refer to the following Strategy Knowledge Base document:
However, neither option works for the Strategy ODBC Driver for Informix Wire Protocol. That is, this driver is unable to take advantage of the Informix client layer nor does it seem to recognize the date format change on the Informix server side. Therefore, in essence, the Strategy ODBC Driver for Informix Wire Protocol does not accept the date format YYYY/MM/DD. Also, the DBDATE parameter can neither be set as a connection string parameter nor through a SQL command which rules out possible workarounds such as report pre-SQL (set as a VLDB property) or as manual connection string parameter (set in Database Instance > Database Connection > Advanced).
This is a known issue. Contact Strategy Technical Support for its latest status.
WORKAROUND
A workaround may be used to make the Strategy ODBC Driver for Informix Wire Protocol accept the date format YYYY/MM/DD, as illustrated by the following SQL statements:
SELECT * FROM TEST WHERE TESTDATE = {d '2004/10/06'}
INSERT INTO TEST VALUES (16, {d '2004/10/06'})
The Strategy SQL engine can be made to generate the above SQL for dates by using the VLDB setting, 'Date Pattern' (located at Project Configuration -> Database Instances -> VLDB Properties -> Select/Insert). Perform the following steps: