Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete for - deletes file
Message
From
09/05/2014 20:50:26
 
 
To
09/05/2014 16:43:03
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01599805
Message ID:
01599829
Views:
64
>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..
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform