Page 1 of 1

Locate on DateTime field table

Posted: Sat 04 Aug 2018 20:23
by Mark2018
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

Re: Locate on DateTime field table

Posted: Tue 07 Aug 2018 13:35
by MaximG
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)

Re: Locate on DateTime field table

Posted: Mon 03 Sep 2018 21:42
by Mark2018
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

Re: Locate on DateTime field table

Posted: Wed 05 Sep 2018 13:28
by MaximG
Thank you for the information. We will investigate the described issue and let you know the results shortly.

Re: Locate on DateTime field table

Posted: Thu 13 Sep 2018 16:28
by Mark2018
Hi, any news ?
in my app I need retrieve records with msec granularity...

Re: Locate on DateTime field table

Posted: Fri 14 Sep 2018 12:28
by MaximG
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.

Re: Locate on DateTime field table

Posted: Fri 14 Sep 2018 13:28
by Mark2018
Fantastic !
Thank you very much.

Re: Locate on DateTime field table

Posted: Wed 19 Sep 2018 12:34
by MaximG
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