>I am having an issue that has just suddenly surfaced
>in programming when line reads
>
>Delete for namet = "XNAME"
>pack
>
>
>instead of deleting the records selected - VFP deletes the whole file.
>
>What's going on here?????? Halp!!!!
>
>k
You could be running afoul of an antivirus/antispyware with the PACK.
If I'm not mistaken, PACK does the following:
1. Copy all records in original table that aren't tagged for deletion to new temporary file
2. Close both the original and new temporary file
3. Erase the original DBF file.
4. Rename the temporary file created in step 1 to original filename
5. Open the newly-created file.
There is a chance that an antivirus will stop you between one or more of these steps -- in that case the program tends to error out (unless you happen to have an error trap in effect that would ignore errors and silently cause a failure). Sometimes you'll luck out and you'll still find the temporary file (often with gibberish-looking filename) that you can rename back to the original filename..