|
AnyDAC
|
The class implementing SQLite database validate service.
uADPhysSQLite
Use the TADSQLiteValidate component to add a database validate capability to an application. This is a programmatic method to invoke the specific SQLite PRAGMA and other commands.
To validate a database an application should:
To produce a DB validate log an application should use OnProgress event. We recommend to use TADSQLiteValidate, when there is no active connections to a database file.
TADSQLiteValidate = class(TADSQLiteService);
Validate database:
procedure TForm1.ADSQLiteValidate1Progress(ASender: TADPhysDriverService; const AMessage: String); begin Memo1.Lines.Add(AMessage); end; procedure TForm1.Button1Click(Sender: TObject); begin ADSQLiteValidate1.DriverLink := ADPhysSQLiteDriverLink1; ADSQLiteValidate1.Database := 'c:\addemo.sq3'; ADSQLiteValidate1.OnProgress := Form1Progress; Memo1.Lines.Clear; if not ADSQLiteValidate1.CheckOnly then ShowMessage('Database has problems ! See log for details.') else ShowMessage('Database is valid'); end;
|
What do you think about this topic? Send feedback!
|