__DBZAP()
Remove all records from the current database file
- Syntax
-
- __DbZap() -> NIL
- Returns
-
- __DbZap() will always return nil
- Description
-
- __DbZap( is a database command that permanently removes all records from files open in the current work area. This includes the current database file, index files, and associated memo file. Disk space previously occupied by the ZAPped files is released to the operating system. __DbZap() performs the same operation as DELETE ALL followed by PACK but is almost instantaneous.
- To ZAP in a network environment, the current database file must be USEd EXCLUSIVEly.
Examples
This example demonstrates a typical ZAP operation in a network
environment:
USE Sales EXCLUSIVE NEW
IF !NETERR()
SET INDEX TO Sales, Branch, Salesman
__dbZAP()
CLOSE Sales
ELSE
? "Zap operation failed"
BREAK
ENDIF
- Status
- Ready
- Compliance
-
- This function is CA Clipper compliant
- Files
-
- Library is rdd