Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delete all records in a DBF - Visual Fox Pro 1

Status
Not open for further replies.

MohdSuffian

Programmer
Aug 15, 2019
2
MY
thread184-517186

how to delete all record in a dbf?

I would recommend like this:

SELECT tablename
DELETE ALL
PACK

or

SELECT tablename
ZAP

Regards
Mohd Suffian
 
Hi Mike,
Of course you're right, haven't zapped for ages.
Only pack after deleting a few records.

Regards,
Phil
 
Hello,

as far as I know zap is much faster.
Both (zap or delete all + pack) need exclusive access.

Regards
tom
 
Your're right, Tom. PACK is the slowest because it involves copying all the records in the table, deleted or otherwise. With ZAP, VFP simply has to change one field in the table header.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top