skip to main content
Part 3: The 32-Bit Drivers : The dBASE Driver : Pack Statement
  
Pack Statement
When records are deleted from a dBASE file, they are not removed from the file. Instead, they are marked as having been deleted. Also, when memo fields are updated, space may be wasted in the files. To remove the deleted records and free the unused space from updated memo fields, you must use the Pack statement. It has the following form:
PACK filename
filename is the name of the dBASE file to be packed. The .DBF extension is not required; the driver automatically adds the extension if it is not present. For example:
PACK emp
You cannot pack a file that is opened by another user, and you cannot use the Pack statement in manual commit mode.
For the specified file, the Pack statement performs the following actions:
*Removes all deleted records from the file
*Compresses unused space in the memo file (.DBT or .FPT)
*Removes the entries for all deleted records from .CDX and .MDX files having the same name as the file