Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RLock, what on OS?
Message
From
12/03/2007 12:37:51
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01202046
Message ID:
01202759
Views:
16
>>What happens on OS level when RLock is issued? How does the actual locking take place?
>>These questions visit me from time to time, i'd appreciate the answer.
>
>Kamil,
>
>Take a look at http://fox.wikis.com/wc.dll?Wiki~HighRangeLockingBug

Hi.
I did not expect to find this way of locking. I was thinking more along the sql server way - putting a share lock on a first byte of a record. Now it looks like OS only is capable of enacting an exclusive lock.
This is what i understood from the link above.
When the RLock is issued for a record in a .dbf VFP places a lock on 2Gb-Recno() byte of the .dbf even thou (for a "normal" .dbf) this is a nonexistent byte. OS does not notice this "wrong" lock for it does not actually locks a byte on HDD, OS only registers it in the .dbf's locks descriptor. Next RLock cheks to see wheater there is a lock on the 2Gb-Recno() byte in the locks descriptor of the .dbf.

Please correct me if i am wrong and if i was able to express myself clearly.
All the best.
A moment of silence is our cosmic reset button.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform