C5_ZAP

ZAP
 Remove all records from the current database file
------------------------------------------------------------------------------
 Syntax

     ZAP

 Description

     ZAP 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.  ZAP
     performs the same operation as DELETE ALL followed by PACK, but is
     almost instantaneous in comparison.

     To ZAP in a network environment, the current database file must be USEd
     EXCLUSIVEly.  Refer to the "Network Programming" chapter in the
     Programming and Utilities Guide for more information.

 Examples

     .  This example demonstrates a typical ZAP operation in a network
        environment:

        USE Sales EXCLUSIVE NEW
        IF !NETERR()
           SET INDEX TO Sales, Branch, Salesman
           ZAP
           CLOSE Sales
        ELSE
           ? "Zap operation failed"
           BREAK
        ENDIF

 Files   Library is CLIPPER.LIB.


See Also: DELETE PACK USE

 

2 responses to “C5_ZAP

  1. Pingback: DB Commands | Viva Clipper !

  2. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.