Advantage TDataSet Descendant
Removes deleted records from the given table and re-indexes the table.
AdsPackTable removes all deleted records from this table instance. Internal fragmentation in memo files will also be eliminated. The table is then re-indexed. If a progress callback function is available, it will be called during the reindexing. The indexes must be opened during the pack or they will become logically invalid. This operation requires exclusive access to the table, which is specified during the open.
Note that if encryption was ever enabled on the table, the table cannot be packed unless the encryption is enabled with the correct password.
AdsTable1.Exclusive := TRUE;
AdsTable1.Active := TRUE;