Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete for - deletes file
Message
De
09/05/2014 20:50:26
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01599805
Message ID:
01599829
Vues:
65
>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..
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform