Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
And another one...
Message
De
21/04/2000 05:40:29
 
 
À
21/04/2000 04:13:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00362153
Message ID:
00362160
Vues:
15
Depending on the information that you require, you may need to use a third party product like GPLIB or equivalent. Alternatively, if you just wish to know if somebody is using a file, database, table etc., etc., you can use error trapping. For example:

llTableUsed = .F.
on error llTableUsed = .T. && Use error trapping
use C:\MyTable exclu && Attempt to open table exclusively
if llTableUsed && Therefore error created, table is in use
endif

All you're trying to do is open the table exclusively. If an error occurs then someone else must have the table open, if not then nobody is using it. This is rather crude, but it does work. Don't forget to close MyTable, or at least open it as shared........

Derek
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform