Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Questions about record locking
Message
 
 
To
16/02/2002 15:44:19
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00621109
Message ID:
00621299
Views:
16
>>>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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform