This is a migrated thread and some comments may be shown as answers.

SQLite and DateTime

1 Answer 65 Views
Databases and Data Types
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Craig
Top achievements
Rank 1
Craig asked on 15 Sep 2013, 09:02 PM
I have read about SQLite and how there are issues handling DateTime with Telerik OA ORM. 

I am getting the following exception when I try to access a table that has a DateTime CLR type that is mapped to a datetime field in SQLite.

Type converter initialization failed. The converter with name 'Timestamp2DateTimeConverterNoTimeSpan' does not convert from CLR type 'System.Nullable`1[[System.Decimal, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' to SQL type 'date'.

I have tried changing the connection string to include DateTimeFormat=ISO8601 parameter, but that doesn;t seem to make any difference. Is there any specific tips you can give me to get this to work?

Thanks in advance
Craig

1 Answer, 1 is accepted

Sort by
0
Thomas
Telerik team
answered on 16 Sep 2013, 03:31 PM
Hi Craig,

yes, SQLite is a bit special with data types. However, it seems that you are using a decimal? field to hold the content of a column of DATE sql type. Can you double-check this, and correct that to DateTime? .
I just verified locally that using the latest version it is possible to map DATE<->DateTime? .

Regards,
Thomas
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
Tags
Databases and Data Types
Asked by
Craig
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Share this question
or