Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RLOCK() and Refreshing
Message
De
03/09/2007 08:53:59
 
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:
01251951
Vues:
15
Hi John,

unfortunately, I need the table to be left open as I need the lock left on the record.

>Frank,
>This is not that unusual. The only way I have found to get the updated data is to close the table and reopen it. Even FLUSH FOURCE won't always clear everything. In cases like yours where there are ongoing transactions against data that need to be immediately visible on other PCs I close the table after the record(s)are updated and close the table before the read. This beats trying to get all my customers to tweak their server and PC buffering With today's network speeds and the speed of the PCs there is no user noticeable performance lag.
>John.
>
>
>>Hi,
>>
>>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