Page 1 of 1
SQLite error 0.44 Julian cannot be represented as DatTime
Posted: Wed 29 Jan 2014 15:33
by Theprasit
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
Re: SQLite error 0.44 Julian cannot be represented as DatTime
Posted: Thu 30 Jan 2014 13:06
by AlexP
Hello,
Please send your DB file to alexp*devart*com, this will help us reproduce and fix the problem
Re: SQLite error 0.44 Julian cannot be represented as DatTime
Posted: Fri 31 Jan 2014 09:15
by Theprasit
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
Re: SQLite error 0.44 Julian cannot be represented as DatTime
Posted: Mon 03 Feb 2014 14:07
by AlexP
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.
Re: SQLite error 0.44 Julian cannot be represented as DatTime
Posted: Tue 04 Feb 2014 02:57
by Theprasit
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