This is a migrated thread and some comments may be shown as answers.

Grid Binding error: Unable to convert MySQL date/time value to System.DateTime

2 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel
Top achievements
Rank 1
Daniel asked on 31 Mar 2011, 11:22 PM
I am running into this error when I try and bind my grid.  I don't have any date fields that are empty, null, or "zeroed".  Just in case, I completely deleted everything in the table.  Same error.  Is there a place I need to perform a conversion?

Unable to convert MySQL date/time value to System.DateTime


Any help is greatly appreciated!
Daniel

2 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 01 Apr 2011, 05:03 PM
UPDATE: Here was the solution I came to with my own problem.  I was having success with one grid but problems on another (which both had a DateTime field).  So, I made sure that "not null" was set on my DB table and deleted my DBModel.edmx and regenerated it (built from the DB).  So, I no longer get the DateTime conversion error.  But, of course, I am still having problems...
0
Les
Top achievements
Rank 1
answered on 14 Apr 2012, 08:40 PM
I ran into this problem today and found that this help with the exception showing....
In your MySQL Connection String set the following:
Convert Zero DateTime=True

Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Les
Top achievements
Rank 1
Share this question
or