SQLite and DateTime

Thread is closed for posting
2 posts, 0 answers
  1. Craig
    Craig avatar
    2 posts
    Member since:
    Oct 2011

    Posted 15 Sep 2013 Link to this post

    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=, 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
  2. Thomas
    Thomas avatar
    590 posts

    Posted 16 Sep 2013 Link to this post

    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? .

    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.
Back to Top