Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Handling Access Denied Error in Report Output
Message
De
13/02/2007 14:29:23
June Kendrick
Kendrick Associates, Inc.
New York, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
01194473
Message ID:
01195301
Vues:
21
>>I'm sending some data to a file with a Copy To statement, but because I've got a prior version of the file open in another program, VFP gives me a "file access denied" (1705) error, which is not handled by the MM framework, so I'm dumped out of the app.
>>
>>I'd like to trap the error when I do the Copy, and return an error indication to the calling method.
>>
>>What's the best way to handle this situation? I could:
>> - change the form's Error method to handle a 1705, but how do I then let the method with the Copy know an error occured?
>> - put an On Error statement before the Copy statement to set a flag if an error occurs on the Copy, and then check the flag. Are there any errors that could happen in a Copy that I wouldn't want to treat as an error here?
>>
>>Any other ideas or thoughts?
>>
>>Thanks,
>>
>>June
>
>Which VFP version you're using? If VFP* and above, you can use TRY/CATCH.

Still VFP 7. Haven't gotten around to upgrading yet.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform