Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Questions about record locking
Message
 
 
À
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:
00621299
Vues:
5
>>>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?
>

Hi Hilmar,

Yes it is simplier and will work as long as your application relases locks. The problem starts when application is terminated w/o releasing the lock, for example it crashes or PC is turned off for any reason. In those cases OS could keep the lock from minutes to hours depending on OS and other factors. I don't think your users would be happy with this scenario.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform