Information générale
Catégorie:
The Mere Mortals Framework
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement