Search    
 

   
 

 
PRAGMA PROGRAM REFERENCE MANUAL
Index
All Operation

Expand All      ADDENDUM
DELETE ALL DA Standard Verb File Access Operation
Target = EXTERNAL ECHO (XE), FILE STATUS (FST)

Deletes all the records in a file.
It does not affect the definition of the file.

The noun EXTERNAL ECHO contains the status message of the DELETE ALL opera-
tion.
Operates very fast. It is the best way to clear a file of records.

DELETE ALL in file FILE

FILE is the name of the file whose records are to be deleted.



SEE ALSO: DELETE / DELETE THIS / EXTERNAL DELETE ALL

DELETE ALL and EXTERNAL DELETE ALL delete all the records in a file, without affecting the definition of the file.


These two verbs operate very fast and this is the best way to clear a file of all its records.

The noun EXTERNAL ECHO or FILE STATUS contains the status message of the DELETE ALL or EXTERNAL DELETE ALL operations.

If any record has been locked by another user you will get back the status "conflict" in the NOUN EXTERNAL ECHO or a 3 in the noun FILE STATUS and the file will not be deleted.

If you are using the PRAGMA 3 internal emulation mode (mode 1) DELETE ALL and EXTERNAL DELETE ALL will wait until nobody has any pending locks and then proceed.



WARNING

DELETE_ALL and EXTERNAL DELETE ALL function by performing a create operation. This causes a problem if under DOS you use the DOS command APPEND and put your PFM or Btrieve files into a different directory than the generated .EXE file. When PFM or Btrieve look for a file, APPEND searches for the file and all is well. But when a DELETE_ALL performs a create operation, it automatically does it in the same directory where the program resides. And from then on all data is written and read from that newly created file.


BTRIEVE WARNING

When Btrieve attempts a DELETE ALL or an EXTERNAL DELETE ALL and encounters a locked record it may give an "INTERNAL LOGIC ERROR" instead of a "conflict". More testing is needed to clarify this situation.


 

CustomWare® is a registered trademark of CustomWare Designs, Inc. All rights reserved.
CustomWare® is a registered servicemark of CustomWare Designs, Inc.  All rights reserved.
All images and designs on this web site are copyrighted© 2021.
v t