Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to see if file can be used exclusive w/o causing err
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00405024
Message ID:
00405285
Vues:
18
>You can create your own error handle
>P.e
>
>On error myerror()
>USE mytable excl
>On error
>
>
>Function myerror
>*- Nothing
>Endfunc

Be careful of this. If you have the table open non-exclusively under a different alias, you can open it again with the exclusive keyword and it still not be exclusive:

USE table ALIAS test1
LOCAL lError
ON ERROR lError=.t.
USE table AGAIN IN 0 EXCLUSIVE

? lError && still shows as .F., no error, but you DID NOT open the table exclusively!


Note that if you do not use the AGAIN clause, it will error.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform