Harbour Reference Guide

 

__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

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/06/26