Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Questions about record locking
Message
De
17/02/2002 06:07:13
 
 
À
16/02/2002 15:44:19
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00621109
Message ID:
00621246
Vues:
10
>>>I was thinking to use some scheme to limit the number of users connected simultaneously (example: limit to 5 users). Locking 5 consecutive records in a table seems safer than saving information to a table. For, if the user's computer hangs, he will remain "logged in", if I use a REPLACE scheme.
>>>
>>>Hilmar.
>>
>>Take a look at the article 'Limiting Simultaneous Users' by Craig Berntson http://www.craigberntson.com/Articles/kb003.htm
>
>Thanks for the link. However, I wanted to ask what you think about the following: wouldn't it be simpler to place locks on 5 (or 10 - depending on the number of licenses) consecutive records in a table, instead of creating files with LLFF and seeing whether they can be opened? Or would record locking be less safe, for some reason?
>
>Hilmar.

Hilmar,

From my experience, locking over a network may take 1-2 seconds if the record is locked by someone else on a different computer

Even with fopen() it may take some time.

If you consider locking records, take a look at
- set reprocess
- sys(3051, ms) && reprocess wait in ms after an unsuccesful lock.

The command above will reduce the time to lock a record if the first attempt is unsuccessful


Also do a google search on them. There was a discussion a few months back
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform