Page 1 of 1

LiteDAC - PRAGMA integrity_check

Posted: Thu 08 Oct 2020 22:49
by needhelp12
Is it possible to run a 'PRAGMA integrity_check' statement using a TLiteConnection component under Delphi 10.4 Sydney?

- If it is, how do we get the results of the integrity check?
-If it is NOT, is there another way to check an SQLite database integrity?

Thanks for your help.

Re: LiteDAC - PRAGMA integrity_check

Posted: Tue 13 Oct 2020 10:22
by MaximG
You can use PRAGMA integrity_check with our components. The following code example shows how to retrieve data with LiteQuery:

Code: Select all

    ...
    LiteQuery.SQL.Text := 'PRAGMA integrity_check';
    LiteQuery.DataTypeMap.AddFieldNameRule ('integrity_check', ftString, 1024);
    LiteQuery.Open;
    ...

Re: LiteDAC - PRAGMA integrity_check

Posted: Tue 13 Oct 2020 17:25
by needhelp12
Thanks. That's exactly what I needed.