It's documented RLOCK() behavior: "Changes to explicitly locked records aren't saved until the record is unlocked or the record pointer is moved". To make changes visible, issue
SKIP
SKIP -1
>
>I am implementing a semaphore locking scheme where I use a VFP table and locate a record, if I can RLOCK() the record, I update some fields in the table with the current username and machine name. Then when the user is finished with the record I unlock it. If another user tries to edit the same data, I look in my semaphore table for the appropriate record and try to RLOCK() it. In this case I can't because it's locked, so I display a message with the information of who has locked it. But, I've been getting the wrong user name and machine name being reported!
>
>This seems to be a VFP thing with RLOCK().
>
>I opened two instances of VFP, opened my semaphore lock table and browsed in both instances.
>
>In one instance I issued:
>
>SET REFRESH TO 1,-1
>
>in the other I went to the particular record I 'm dealing with and issued an RLOCK(). I then manually changed a field to "Frank" (it was "Fred" previously).
>
>In the instance with the set refresh command, the browse kept displaying "Fred".
>
>When I issued an UNLOCK in the RLOCKed instance, only then did "Fred" change to "Frank" in the other instance.
>
>I wonder if I am doing something wrong or what can be done about this?
>
>Thanks,
--sb--