Cannot save SQLITE DATETIME fields using UNIDAC - 0.0 is not a valid timestamp
Posted: Mon 07 Mar 2022 16:37
Hi,
We use latest 9.1 UNIDAC components.
When trying to store a Delphi TDateTIme field inside SQLITE using UNIDAC we receive error "0.0 is not a valid timestamp".
We use code like this
At the DateTime field it raises the error.
Please help us to understand how UNIDAC handles TDateTime fields under SQLITE.
Until now we used FireDac and we didn't encountered any problem with TDateTime fields formatting on SQLite.
We found the 2 params
workDatabase.SpecificOptions.Values['DateFormat'] := 'YYYY.MM.DD';
workDatabase.SpecificOptions.Values['TimeFormat'] := 'HH:MM:SS';
but when we used like here the date is always 0.
Please help!
We use latest 9.1 UNIDAC components.
When trying to store a Delphi TDateTIme field inside SQLITE using UNIDAC we receive error "0.0 is not a valid timestamp".
We use code like this
Code: Select all
dbSource.StartTransaction;
qGetLicenses.Insert;
....
qGetLicenses.FieldByName('ACQUISITION_CONTRACT_DATE').AsDateTime := tbMemLicenteDisponibile.FieldByName('ACQUISITION_CONTRACT_DATE').AsDateTime;
.....
qGetLicenses.Post
dbSource.Commit;
Please help us to understand how UNIDAC handles TDateTime fields under SQLITE.
Until now we used FireDac and we didn't encountered any problem with TDateTime fields formatting on SQLite.
We found the 2 params
workDatabase.SpecificOptions.Values['DateFormat'] := 'YYYY.MM.DD';
workDatabase.SpecificOptions.Values['TimeFormat'] := 'HH:MM:SS';
but when we used like here the date is always 0.
Please help!