Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try/Catch
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00802432
Message ID:
00802532
Vues:
34
>How about the following?
>
>
ON ERROR lError = .T.
>lError = .F.
>
>USE table1 EXCLUSIVE IN 0
>
>IF NOT lError
>   USE table2 EXCLUSIVE IN 0
>
>   IF NOT lError
>      USE table3 EXCLUSIVE IN 0
>   ENDif
>ENDif
>
>IF lError
>   ? "Could not get exclusive use of all tables."
>ENDif
I would discourage this. In pre-VFP8 apps, this was often required. But this is a very risky technique. What if someone comes along later and adds an Error() method to this?

Markus




Markus Egger
President, EPS Software Corp
Author, Advanced Object Oriented Programming with VFP6
Publisher, CoDe Magazine
Microsoft MVP since 1995
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform