Note | This command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available |
Remove all records marked for deletion from the current database file, rebuild all active orders, and recover all physical space occupied by the deleted records. Note that this will not affect memo files. Unused space in memo files can only be recovered by using COPY.
PACK [[IN|ALIAS] <workarea>]
IN|ALIAS <workarea> | Specifies the work area for which the operation must be performed |
PACK is functionally equivalent to DBPack().
Warning! PACK does not create backup files. You may want to make a backup of the file (using COPY FILE, for example) before issuing this command; otherwise, you will not be able to recover deleted records.
The following shows the result of a simple PACK:
USE sales NEW
? LastRec() // Result: 84
DELETE RECORD 4
PACK
? LastRec() // Result: 83
XSharp.RT.DLL
DbPack(), DELETE, Deleted(), RECALL, REINDEX, SetDeleted() , SetExclusive(), ZAP