mysql - ODBC call failed - Random date overflow errors after moving from 32-bit ODBC 5.1 to 64-bit 5.3 -


background:

  • legacy code running in ms access 2003.
  • sqls run currentdb in access.
  • currently running on windows 7 32-bit machine.
  • connecting mysql server 5.5 through odbc 5.1 driver.

problem:

  • trying migrate windows server 2012 64 bit.
  • odbc 5.3 unicode driver (32 bit).
  • don't want use time rewriting there lot of code, , in not distant future removed.

issue:

  • several sql statements fail when running on new servers. worked on old servers.
  • all failed sqls have now() in statement.
  • error description says odbc call failed. while more detailed description says date overflow - "[mysql][odbc 5.3(w) driver][mysqlid-5.5.28-log]date overflow".
  • happens randomly, , when happens , access stops 1 can choose continue , sql work. fails less 1% of times runs (of thousands).
  • the dates in sql in clause: "and fielda > now()", fielda datetime column. recordset sql. error during insert same, integer subtracted now() before compared datetime.

i don't understand why says date overflow when there doesn't seem reason time of either datetime or "now" removed? , since datetime field in database , now() current date , time there shouldn't invalid dates?

any in problem might or how debug/log might highly appreciated.

turning trace on in odbc driver not option because happens randomly, there traffic therefore slow down such nothing happens.

note did encounter 1 sql date overflow error message correct. seems prior 5.3 when inserting datetime date field automatically truncated, because sql had been successfull 3000 times started failing. therefore sql has been fixed extracting date field first. other errors must different.

new version containing bugfix has been released oracle: 5.3.8

this error bug seems have been introduced in version 5.1.11.

in advanced options there date overflow check box has ticked code continue when there error.

reply oracle fix: "for information fix approach in c or c++ possible read or write date type using sql_timestamp_struct. struct can hold both date , time. error (date overflow) generated when operations supposed date-only struct got non-zero values time. canonical approach odbc api requires, however, causes inconveniences when instance app did not bother initialize whole structure 0 values because knows need date part random values time fraction cause errors despite of being truncated. new option introduced continue query execution rather return error. server ignore time part , result same if there zeroes."


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -