Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Event in a form
Message
De
02/05/2001 19:29:17
 
 
À
02/05/2001 17:52:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00502795
Message ID:
00502822
Vues:
15
Hi Stephane.

>Is it possible, like with the "ON ERROR" command, to redefine or re-direct the Error Event of a form?

No, but you can control what happens in the Error method.

>Here's why: I'm trying to open a table in 'exclusive' mode inside an object and I don't want any error messages or anything like that if it fails.

Here's how you could do that in the Error method (this is just off the top of my head, so don't expect to copy and paste it and have it work <g>):
use MYTABLE
if not used('MYTABLE')
* error must have occurred, so do something here
endif

procedure Error && the Error method of the form
lparameters tnError, tcMethod, tnLine
do case
    case tnError = &&something that indicates a problem with the table
        return
* rest of cases go here
endcase
Doug
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform