摘要: 在使用Mysql数据库开发应用程序时,使用EntityFramework进行实体类转换时,报异常信息:Unable to convert MySQL date/time value to System.DateTime。主要原因是因为Birthday字段时存在0000-00-00 00:00:00这种类型的内容,解决办法有两种:1.第一种是在存数据或读数据时,使用程序或mysql内置函数进行格式化。2.第二种,是我目前使用的方式,字符串连接符中,增加Convert Zero Datetime=True和Allow Zero Datetime=True。 阅读全文
posted @ 2013-05-02 12:49 johndu 阅读(294) 评论(0) 推荐(0) 编辑