Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Record pointer changes when other user inserts!
Message
 
To
21/06/2003 20:31:06
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00802079
Message ID:
00802676
Views:
34
Thanks Gerry. I did not know that RLOCK() in this context would lock the current record on disk not the one in the buffer.

I have modified my code to use table buffering and no locking after APPEND BLANK.

[If there is something in this complex form that moves the record pointer then that would trigger a TABLEUPDATE if record buffering is being used. This may have been the reason why occasionally unsaved records were being seen by other sessions.]

--George

>Your APPENDed record is "in the buffer"; by definition, it is already exclusive to you and "invisible" to everyone else until you TABLEUPDATE, or move off the record.
>
>In the current context, you are not locking your appended record (in the buffer), you're trying to lock the "current record" in the table ...
>
>>The code is very simple:
>>
SET MULTILOCK ON
>>USE CUSTOMER
>>=CURSORSETPROP("Buffering", 3)
>>APPEND BLANK
>>?RLOCK()
>>Now start another session of VFP and run the same code. The lock will fail.
>>
George
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform