-
Notifications
You must be signed in to change notification settings - Fork 19
Mysql oddities
Mysql has its quirks, and some of them can cause failures where the cause is not obvious at first. Here are some oddities that have been reported back to me with solutions. Big thank you to daneb for bothering to report back with solutions.
Kept running into "null" returns when executing a simple query, debugging into the Simple.Data method revealed the following error message: Exception Details: MySql.Data.Types.MySqlConversionException: Unable to convert MySQL date/time value to System.DateTime
This is not a bug per se, but here is the solution for others who may run into the problem: Solution [ added in connection string ] Allow Zero Datetime=true
PS. My version of mysql is: mysql-max-4.1.1.9 Reported by daneb
##2. Unreadable column names: I get continual error message "cannot find column", when trying to run a query, something as simple as:
var db = Database.Opener.OpenConnection("server=127.0.0.1;user=root;database=helpdesk-development;password=");
var job = db.jobs.FindByJob_Id(49950);
I downloaded the source and debugged and noticed that the column names were returning with a name of System.Byte[].
I resolved in the following fashion: Respect Binary Flags=false in the connection string. Reported by daneb