Bug #8544 MySQLConnectorAdapter gives exception on reading 0 timestmp field
Submitted: 16 Feb 2005 14:17 Modified: 16 Feb 2005 17:31
Reporter: Navneet Karnani Email Updates:
Status: Duplicate Impact on me:
Category:Connector / NET Severity:S1 (Critical)
Version:1.0.4 OS:Microsoft Windows (Windows 2000)
Assigned to: CPU Architecture:Any

[16 Feb 2005 14:17] Navneet Karnani
We have a  table with a timestamp field. In our code we had an error where we were setting the value in this timestamp field (unintentionally) to zero since we were giving a "Nothing" (VB.NET) to the MySQL ODBC Driver. 

Now we have a table with 100s of records having "000000000000000000000000" in the timestamp field. The adapter gives and exception "Unable to convert MySQL date/time value to System.DateTime" when loading this field.

How to repeat:
1. Create table with timestamp field. 
2. Set the value to 0
3. Try to read the data using a adapter.

Suggested fix:
Handle a zero in the timestamp field to return nothing
[16 Feb 2005 17:39] Navneet Karnani
Can you also put the link and/or bug number of the bug of which this is a duplicate so that I can track the fix. We are planning to ship a release of our product over the next few days. Is there going to be a release this week ?