This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have a table created with the following script: SET character_set_client = utf8;
When I try to read entities from this table using Lightspeed, I get an error:
The inner exception is:
In my model I have the field:
I can workaround this problem by setting "Is Nullable" to True, but in this case all the dates in the Lightspeed objects are null. Maybe the problem is in parsing MySQL string - my locale is not English. Please let me know how to fix this problem. |
|
|
One more information: I have added: "Allow Zero Datetime=true" to my ConnectionString and it didn't help. In fact none of the dates are empty in my DB. |
|
|
The MySQL Connector maps the .NET DateTime type to the MySQL DATETIME type. If you have the option to change the column data type to DATETIME, then that is the easiest solution. If not, you will need to use a field converter to translate between the MySQL Connector's MySqlDateTime type and the .NET DateTime type. There's a primer on this at http://www.mindscapehq.com/documentation/lightspeed/Working-with-Legacy-Databases/Mapping-Database-Types-to-Domain-Types and we'd be happy to provide additional guidance if required. |
|
|
It works fine. Thank you :-) |
|