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:
00759250
Views:
21
>The problem is IsRlocked() function.
>It does not return the correct value.
>It may return a .f. but when rLock() tries to lock it you get a .f..
>Record is in use...

Mike,

This may be redundant to my other post on this thread but I just wanted to put this in contect with the question you have here.

IsRlocked returns .T. if the current station has the record locked (a record locked by another station cannot be also locked by this station therefore IsRlocked will always retunr .F. for a record locked by another station) IsRlocked does noT attempt to lock the record.

RLock tries to lock the record and it it can the return is .T. if it can't then .F. is returned. The only way you can accurately know if you can lock a record is to try to lock it. Any other way may tell you yes you lock it but by the time your code tries to actually get the lock someone else has gotten one and your fails.
Previous
Reply
Map
View

Click here to load this message in the networking platform