Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RLOCK() and Refreshing
Message
De
05/09/2007 13:05:19
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01251823
Message ID:
01252500
Vues:
15
Thanks Sergey,

If only I could now explain why it seems to work for the developers and not for me and why when I tried to use LOCATE after the RLOCK() and update it didn't work for me....

>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,
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform