Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Used File
Message
 
À
19/07/1999 23:48:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00243420
Message ID:
00243630
Vues:
38
You need to try to USE it exclusively, then test for an error condition.
Something like this. This code assumes that you don't have the file open
already on your workstation.

lcWasOnErr = ON("ERROR")
llOpenByAnother = .F.
ON ERROR llOpenByAnother = .T.
USE thefile.dbf EXCLUSIVE
IF llOpenByAnother = .T.
*--File was open by someone else.
ELSE
*--File is available for exclusive use.
ENDIF
USE IN thefile
ON ERROR &lcWasOnErr.

HTH
-Matt
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform