Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete File Errors
Message
De
26/04/2005 09:20:21
 
 
À
26/04/2005 08:42:26
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01008399
Message ID:
01008418
Vues:
17
>Since Delete File does not return any value what is the best way to trap for errors when Delete File fails?

TRY .. CATCH .. ENDTRY or a dummy ON ERROR routine before the delete and reset the ON ERROR afterwards.

Update: for VFP6 it will have to be the dummy ON ERROR option:
ON ERROR lDelFailed = .T.
lDelFailed = .F.

DELETE FILE (somefile)

IF lDelFailed 

  * delete failed

ENDIF
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform