ZAP

From Lianjapedia
Revision as of 12:01, 14 June 2016 by Yvonne.milne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Permanently remove all records from the active table

Syntax

ZAP

See Also

DELETE, DISPLAY PROTECTION, LIST PROTECTION, PACK, SEQNO(), SET EXCLUSIVE, SET SEQNO, SET SHARE, TRUNCATE TABLE

Description

The ZAP command permanently removes all of the records from the active table, without affecting the table structure. ZAP is equivalent to DELETE ALL, followed by PACK. The ZAP command can only be performed on a table that is open for exclusive use. The ZAP command is typically used to reinitialize a 'transaction' table, or a journal file. ZAP also resets the table SEQNO to zero.

Any index files that have been associated with the active table are also reinitialized. Once a table has been 'zapped', there is no way of recovering the records that were previously contained in it. You should always use this command with caution.

Example

set exclusive on
use newpatrons
zap