LiteDAC - PRAGMA integrity_check

Discussion of open issues, suggestions and bugs regarding LiteDAC (SQLite Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
needhelp12
Posts: 4
Joined: Thu 22 Mar 2012 22:52

LiteDAC - PRAGMA integrity_check

Post by needhelp12 » Thu 08 Oct 2020 22:49

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.

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

Re: LiteDAC - PRAGMA integrity_check

Post by MaximG » Tue 13 Oct 2020 10:22

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;
    ...

needhelp12
Posts: 4
Joined: Thu 22 Mar 2012 22:52

Re: LiteDAC - PRAGMA integrity_check

Post by needhelp12 » Tue 13 Oct 2020 17:25

Thanks. That's exactly what I needed.

Post Reply