Entity Framework - MySQL - Datetime format issue

Posted by effkay on Stack Overflow See other posts from Stack Overflow or by effkay
Published on 2009-12-14T18:12:07Z Indexed on 2010/04/29 17:37 UTC
Read the original article Hit count: 428

Filed under:
|
|

Hello;

I have a simple table with few date fields.

Whenever I run following query:

var docs = ( from d in base.EntityDataContext.document_reviews
select d ).ToList();

I get following exception:

Unable to convert MySQL date/time value to System.DateTime. 
MySql.Data.Types.MySqlConversionException: Unable to convert MySQL date/time value to System.DateTime

The document reviews table has two date/time fields. One of them is nullable.

I have tried placing following in connection string:

Allow Zero Datetime=true;

But I am still getting exception.

Anyone with a solution?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about entity