EasyTable: Single-File Embedded Database,
a BDE replacement for Delphi and C++Builder



Repairing a database

Previous  Top  Next


Call RepairDatabase to repair all tables' data corruption that can occur due to unexpected power loss or improper operating system shutdown.

For example, the following statement repairs the database:

var
Log: string;
begin
CustomerBase.Connected := False;
if not CustomerBase.RepairDatabase(Log) then
ShowMessage('Some problems found. Repair log:'+Log)
else
ShowMessage('All data repaired successfully');
end;

Note:
Repairing process may take a long time if you work with large database. You may set the OnProgress event handler to provide the user with a feedback about the progress of the slow process.


© AidAim Software EasyTable: