Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unlock trap
Message
From
30/10/1998 04:55:22
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00152187
Message ID:
00152637
Views:
30
>Hi Barbara,
>
>The RECORD clause does not make any difference. I put buffering on 3 i.o. 5 and again no difference. It seems you can only unlock all or none, and unlocking the last in effect unlocks all, and unlocking a record that is not the last locked, doesn't do anything.
>
>Thanks for caring,
>
>Marc
>
>
>
>
>
>>Marc,
>>What happens if you use the record number clause? UNLOCK RECORD 1 or UNLOCK RECORD 1054 (you should be able to find the record # you want easily).
>>
>>HTH
>>Barbara
>>
>>>Hi,
>>>
>>>Here is my situation:
>>>
>>>vfp 5, support pack 3 installed.
>>>set multilock on
>>>buffering is set to 5
>>>
>>>In a private datasession, I lock 2 different records using rlock().
>>>
>>>I use UNLOCK to unlock (what I hoped to be) 1 record. The problem is that if I unlock the last record, all the records are unlocked, if I unlock the first record, no record is unlock.
>>>
>>>Can anybody shed any light on this?
>>>
>>>TIA
>>>
Marc,
You can't rlock() buffered data. By setting the buffering to 5 (or 3) your getting optimistic buffering, which means the record/s are not getting locked in the table while they are edited, VFP will lock them when you call tableupdate() though, which means anybody can edit the records while you are editing them.
If you set buffering to 2 - pessimistic record buffering or 4 - pessimistic table buffering the records will be buffered and they will be locked in the table for you so nobody else can modify them while you are editing. If you set buffering to 4 the header of the table will be locked which means nobody else can edit any records in the table while its locked. The whole point of buffering is so you don't have to manually use rlock() VFP does it for you. Hope this helps.

Mark
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform