SQLite error 0.44 Julian cannot be represented as DatTime

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Theprasit
Posts: 15
Joined: Fri 17 Nov 2006 04:01

SQLite error 0.44 Julian cannot be represented as DatTime

Post by Theprasit » Wed 29 Jan 2014 15:33

I created project with SQLite DB using FireDAC. The project is working fine on all field type including DATETIME data type. I tried to convert my project to UniDAC but have problem with DATETIME field.
A table is declare field type as DATE and can open with SQLite Expert data manager, FireDAC and also Zeos. When open that table with UniDAC all record shown error and sometime revert back to the beginning date xx/xx/1989.

I tried to do config in UniConnection but cannot resolve.

Any advise please?

Regards,
TS

P.S. I used UniDAC 5.25 trial with Delphi XE

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQLite error 0.44 Julian cannot be represented as DatTime

Post by AlexP » Thu 30 Jan 2014 13:06

Hello,

Please send your DB file to alexp*devart*com, this will help us reproduce and fix the problem

Theprasit
Posts: 15
Joined: Fri 17 Nov 2006 04:01

Re: SQLite error 0.44 Julian cannot be represented as DatTime

Post by Theprasit » Fri 31 Jan 2014 09:15

Thank you for you reply.

After dig into my issue, found that the cause may came from FireDAC when I did data type mapping of DateTimeFormat to "DateTime" rather than "String". If I changed back to "String", FireDAC cannot encode those format while Zeos can display both of format without error. If I clear previous data and append new record, UniDAC allow data insertion and display correctly.

I sent a sample database "TimeSheet.db3" as per your request.

Regards,

TS

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: SQLite error 0.44 Julian cannot be represented as DatTime

Post by AlexP » Mon 03 Feb 2014 14:07

SQLite supports 3 date formats: STRING, UNIX(INTEGER), JULIAN(REAL) - http://www.sqlite.org/datatype3.html#datetime . Data in your database was inserted in the Delphi format, therefore an error was raised on a conversion attempt. We have added support for the Delphi format - the NativeDate option. This feature will be included to the next build.

Theprasit
Posts: 15
Joined: Fri 17 Nov 2006 04:01

Re: SQLite error 0.44 Julian cannot be represented as DatTime

Post by Theprasit » Tue 04 Feb 2014 02:57

That's great!

Per my previous, I knew for the cause of problem but the issue might let me and the others who need to migrate from others SQLite dataconnector eg. FireDAC to UniDAC run in trouble. Adding this new feature is a much appreciate.

Regards,

TS

Post Reply