Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Locfile()
Message
De
22/09/2009 16:53:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01425645
Message ID:
01425672
Vues:
41
>>>>When I get out from LOCFILE() window by "Cancel" open an error window: "File does not exist." "Cancel, Suspend, Ignore". This is not good for users. How can I manage this situation in my program?
>>>>(VFP 9.0)
>>>
>>>Check out for not empty the result of LocFile before the next statement.
>>
>>Nadya, that would be GetFile(). LocFile() seems to be DESIGNED to return an error message. I suggested to use GetFile().
>
>Ok, then just check the file existence with SYS(2000)

Oh, well, I never used locfile() myself... I found out in the meantime that locfile() is designed to open a single file, not to find a file by extension. TRY...CATCH does seem to work, though.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform