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



Compacting a database

Previous  Top  Next


Call CompactDatabase to compact database file.
Compacting database file usually reduces file size and increases its performance

For example, the following statement compacts the database:

var
Log: string;
begin
CustomerBase.Connected := False;
if not CustomerBase.CompactDatabase(Log) then
ShowMessage('Some problems found. Log:'+Log)
else
ShowMessage('Database compacted successfully');
end;

Note:
Compacting 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: Easytable Bde Alternative Single File Delphi Databas