Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More RLOCK Stuff
Message
 
To
17/03/1999 13:45:03
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00198638
Message ID:
00198748
Views:
20
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
Previous
Reply
Map
View

Click here to load this message in the networking platform