Information générale
Catégorie:
The Mere Mortals Framework
>>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
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