[Mono-dev] A bug in the latest SVN System.Data (concurrency exception)?
kornelpal at gmail.com
Wed Oct 18 17:10:20 EDT 2006
>DateTime dt = new DateTime(0);
>which yields, for the MySql connector the following string:
>and I have a field in the database of the date type set to 0,
>which for MySql renders the string:
>Now, the command builder builds a command that first sets all the
>fields and then uses them all in the WHERE clause with the original
>values - this is the way Mono detects the concurrency problem.
>Obviously, there is no match for the above datetime field and the
>entire transaction "fails" - that is, no rows are affected and the
>exception is thrown. Not sure how to solve it though :)
Is it possible to pass date values as integers rather than strings? It could
solve the problem. Note that 0000-00-00 00:00:00 is an invalid date so MySql
may store 0001-01-01 00:00:00 using a different value that is non-zero. If
there is no other solution 0001-01-01 00:00:00 and 0000-00-00 00:00:00
should be treated equally by the connector.
More information about the Mono-devel-list