Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More RLOCK Stuff
Message
 
À
17/03/1999 13:45:03
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00198638
Message ID:
00198748
Vues:
21
Ian,

RLOCK() and FLOCK() both will attempt to lock a record or file and if they succeed the functions return .T. Your code;

IF RLOCK() = .T.

is locking the record (BTW, you don't need the = .t. at all).

If you want to know if the rlock failed (because someone else has it locked then use code like this;
IF NOT RLOCK()
   Wait window "Somebody else is working on this record
ELSE
   UNLOCK
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform