Dear Vuke,
In looking up that error with ODBC all the info I found indicates that this is an error thrown by ODBC when bad or corrupted data exists in a date field.
The following information may be helpful - note the condition that requires that
Error 22007 to be returned by odbc in item 3 below .
The required ISO 8601 syntax for DATE is:
DATE `YYYY-MM-DD`
Comments:
1) DATE combines the datetime fields YEAR, MONTH and DAY.
2) DATE defines a set of correctly formed values that
represent any valid Gregorian calendar date between January 1, 1
AD and December 31, 9999 AD.
3) Any operation that attempts to make a DATE <data type>
contain a YEAR value that is less than 1 or greater than 9999
will fail; the DBMS will return the:
SQLSTATE error 22007 "data exception-invalid datetime format".
4) DATE expects dates to have the following form: yyyy-mm-dd
e.g.: 1994-07-15 represents July 15, 1994.
5) DATE has a length of 10.
6) Date literals must start with the <keyword> DATE and
include `yyyy-mm-dd`;
e.g.:
CREATE mytable (mydate DATE);
INSERT INTO mytable (mydate) VALUES (DATE `1996-01-01`);
I suggest that you examine your database with whatever database tool you use.
Hope that helps,
ro
Rosemary Lieberman
rosemary@microflo.com,
Microflo provides expert consulting on MagicTSD and Crystal Reports.