Syntax
DbPack() --> NILArguments
None.
Return value
NIL.
Description
DbPack() scans the current file, omits records marked by DbDelete(), rewrites the remaining records, and rebuilds active indexes. The current record identity and pointer can change because records are renumbered during the rewrite. The area remains open after packing.
Notes
The work area must be writable and free of conflicting locks. I/O, sharing or index errors raise a runtime error. DbPack() removes only deleted records; DbZap() removes every record regardless of its deletion mark.
Example
PROCEDURE Main()
DbUseArea( .T., , "people.dbf", "People" )
DbPack()
QOut( "DbPack: OK" )
DbCloseArea()
RETURNOutput