Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RLOCK() - again.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
RLOCK() - again.
Miscellaneous
Thread ID:
00152118
Message ID:
00152118
Views:
56
I've been asked once again for assistance with a multi-user app in 6.0. It seems that RLOCK() is returning .T. even when a record is locked by another user. I searched back one year reading on others issues with RLOCK. They are trying to lock a parent record and several child records. Forms are private datasessions, reprocess is set to 10, multilocks is on......everything seems correct. I tried this (standalone machine) starting up two instances of the app, sure enough, RLOCK() indicated that both "users" got the lock. Of course, things blew up when the 2nd user tried to update.

I looked at the code, it's like this;
SELECT SomeAlias
=SEEK(nKey, "SomeAlias", "TagName")
IF RLOCK()
lLockFlag = .T.
ELSE
lLockFlag = .F.
ENDIF

With wait windows, even the second "user" had RLOCK() returning .T.
I can't help these folks as far as a network goes, but it seems to me that RLOCK() should be locking these records even with two instances of the same app running on one PC.

Any known reasons why RLOCK() would return .T. for both instances but then blow up (record was clearly locked by 1st) when the 2nd user attempts to update? The app checks the flag and notifies the user that the record is locked by another, but it's always .T.

Thanks,
Steve
Next
Reply
Map
View

Click here to load this message in the networking platform