Locate on DateTime field table

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Mark2018
Posts: 4
Joined: Sat 04 Aug 2018 20:03

Locate on DateTime field table

Post by Mark2018 » Sat 04 Aug 2018 20:23

Hello,
my Locate on a DateTime field fail, I gess due to some kind of format...

I write the records assigning value to the field .asDateTime and content result is '04/08/18 16:18:02'.
If I read back records in TDateTime variable I get back the same format.
But any Locate using a TDateTime variable as argument, fails.
If I convert that variable in a string, using DateTimeToStr() the Locate are successful...
Is it correct ? any idea on make it work directly with TDateTime values ?

Regards,
Mark

MaximG
Devart Team
Posts: 1138
Joined: Mon 06 Jul 2015 11:34

Re: Locate on DateTime field table

Post by MaximG » Tue 07 Aug 2018 13:35

We tested SQLite work according to your description and found no problems. To investigate the issue, please compose and send us a small test sample, execution of which causes the issue. In addition, we will need a file with SQlite database used in this sample. This database should contain a table with the data that you use in the described case.
For this, it is convenient to use the e-support form (https://www.devart.com/company/contactform.html)

Mark2018
Posts: 4
Joined: Sat 04 Aug 2018 20:03

Re: Locate on DateTime field table

Post by Mark2018 » Mon 03 Sep 2018 21:42

Hello,
after further investigation seems that TLiteTable record read
return only partial value of DATETIME fields of a table;
the milliseconds part is absent or always 000.

It happens even setting

Code: Select all

SqLiteConnection.options.timeformat := 'hh:mm:ss.zzz';
and

Code: Select all

Formatsettings.LongTimeFormat := 'hh:mm:ss.zzz'; 
I was fooled because until Close table, any read back of records, give me the correct value including milliseconds.
But after table Close and Reopen, in all the records read, the msec part is absent...
I have posted a demo prj in the e-support form.

Regards

MaximG
Devart Team
Posts: 1138
Joined: Mon 06 Jul 2015 11:34

Re: Locate on DateTime field table

Post by MaximG » Wed 05 Sep 2018 13:28

Thank you for the information. We will investigate the described issue and let you know the results shortly.

Mark2018
Posts: 4
Joined: Sat 04 Aug 2018 20:03

Re: Locate on DateTime field table

Post by Mark2018 » Thu 13 Sep 2018 16:28

Hi, any news ?
in my app I need retrieve records with msec granularity...

MaximG
Devart Team
Posts: 1138
Joined: Mon 06 Jul 2015 11:34

Re: Locate on DateTime field table

Post by MaximG » Fri 14 Sep 2018 12:28

We fixed the bug with getting the value of milliseconds of the DITETIME type fields. The fix will be included in the next build of our product, which we are planning to release next week.

Mark2018
Posts: 4
Joined: Sat 04 Aug 2018 20:03

Re: Locate on DateTime field table

Post by Mark2018 » Fri 14 Sep 2018 13:28

Fantastic !
Thank you very much.

MaximG
Devart Team
Posts: 1138
Joined: Mon 06 Jul 2015 11:34

Re: Locate on DateTime field table

Post by MaximG » Wed 19 Sep 2018 12:34

New build of LiteDAC 3.3 including the required changes is already available. A full list of changes is available by the link :
https://www.devart.com/litedac/revision_history.html

Post Reply