Search found 8 matches

by Mark2018
Sun 10 Jan 2021 16:34
Forum: SQLite Data Access Components
Topic: Binary data in blob field
Replies: 5
Views: 19054

Re: Binary data in blob field

Hello,
can you give me a sample code to write an read an array of floats (type single) into a Blob field ?

REgards
by Mark2018
Tue 27 Nov 2018 16:15
Forum: SQLite Data Access Components
Topic: TLiteUserFunction
Replies: 1
Views: 6814

TLiteUserFunction

Hi,
can you give any example on TLiteUserFunction to get back a result parameter ?
And how to register the function ? I expected an Execute method or Active prop...

I have defined a simple function funCountStatus2 as

Code: Select all

SELECT COUNT(*) FROM :aTable WHERE STATUS = 2;
I have set

Code: Select all

LiteUserFunction.FunctionName := 'funCountStatus2';
but from manual it's not clear how use TLiteUserFunction
I have used a TLiteSQL to call the function

Code: Select all

SELECT funCountSendStatus1(:aTable) as count;
but don't know how get back the result...
Can you help ?
by Mark2018
Mon 26 Nov 2018 15:06
Forum: SQLite Data Access Components
Topic: liteTable.FetchAll
Replies: 1
Views: 6964

liteTable.FetchAll

Hello,
I have an odd behaviour in TliteTable;
working with two TLiteTables on the same DB table, adding few records useing the first TliteTable1 and committing,
if I open the 2nd TLiteTable2 I cannot LOCATE the records just added...
It seems due to FetchAll=False on second table.
But the manual says that
When the FetchAll property is False, the first call to TMemDataSet.Locate and TMemDataSet.LocateEx methods may take a lot of time to retrieve additional records to the client side.
which means some more time necessary, Not that records are not found at all...
With FetchAll=False also the TLiteTable2 .RecordCount result wrong (without records just added and committed).
Of course everything is correct (Locate, RecCount) working on TLiteTable1 only.
What is the right interpretation of FetchAll together with RecordCount ?

Regards
by Mark2018
Sun 18 Nov 2018 23:20
Forum: SQLite Data Access Components
Topic: CloneCursor
Replies: 1
Views: 5356

CloneCursor

Hello,
seems CloneCursor not available in LiteDAC.
Any advice/example for the best way to get similar result ?

Regards
by Mark2018
Fri 14 Sep 2018 13:28
Forum: SQLite Data Access Components
Topic: Locate on DateTime field table
Replies: 7
Views: 7433

Re: Locate on DateTime field table

Fantastic !
Thank you very much.
by Mark2018
Thu 13 Sep 2018 16:28
Forum: SQLite Data Access Components
Topic: Locate on DateTime field table
Replies: 7
Views: 7433

Re: Locate on DateTime field table

Hi, any news ?
in my app I need retrieve records with msec granularity...
by Mark2018
Mon 03 Sep 2018 21:42
Forum: SQLite Data Access Components
Topic: Locate on DateTime field table
Replies: 7
Views: 7433

Re: Locate on DateTime field table

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
by Mark2018
Sat 04 Aug 2018 20:23
Forum: SQLite Data Access Components
Topic: Locate on DateTime field table
Replies: 7
Views: 7433

Locate on DateTime field table

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