Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Handling Access Denied Error in Report Output
Message
 
À
10/02/2007 17:28: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:
01194569
Vues:
16
June,

You can use a low level file open (FOPEN) to see if you can first open the file for read and write and if you can then FCLOSE the file and you are good to go otherwise handle the already open file condition.

HTH

-Dan

>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform