>>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~HighRangeLockingBugHi.
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.