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
|
Hi, I have a table in my MySQL database having a TIME field. This gives the following exception: Unable to materialize field [TimeFrom] on type [Personnel.Employeeworkinghour]: field is type 'System.DateTime' but database returned type 'System.TimeSpan'. Changing the property type in my model to TimeSpan didn't help, the message simply changes to "field is type 'System.TimeSpan' but database returned type 'System.TimeSpan'". I'm using MySQL 5.1 and MySQL Connector .NET 6.2.2. LightSpeed 3.1 Any help will be appreciated Diego |
|
|
I think this is because LightSpeed tries to materialise TimeSpan fields from Int64 columns (because not all databases have a time type). In current nightly builds, you can get around this by providing a custom field converter. See http://www.mindscape.co.nz/forums/Thread.aspx?PostID=11542 for the details and an illustration of resolving the exact same issue on a different database. It's also supported in the designer via the User Defined Types feature (let me know if you need details). |
|