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:

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

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 Ben Delphi Database Single File Bde Replacemen