Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do you lock a record fast?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00758830
Message ID:
00759247
Views:
13
Mike,

IsRlock only tells you if YOU have a lock. Rlock() is the only way to find out if you can lock the record. This si how I would approach it;
SELECT TheAliasIWant
* This scan loop will attempt to lock each record until is gets one it can lock, 
* then it locks that record and exits the loop.  If cannot lock any records the 
* loop will end when all records have bee tried, then the IF after the endscan 
* will find that the current record is NOT locked by this station and you can 
* act appropriately.
SCAN WHILE NOT RLOCK()
ENDSCAN
IF IsRlocked()
   * We locked a record
ELSE
   * We did not find a record we could lock
ENDIF
Previous
Reply
Map
View

Click here to load this message in the networking platform