Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-User environments and Record Locking
Message
 
 
To
19/06/2001 04:39:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00520882
Message ID:
00521030
Views:
19
>HI
>
>Can I have peoples views on Record-locking in multi-user env's.
>
>How do you handle it? Do you use optimistic/pessimistic? Do you always check for a record lock before amending data? do you make sure a user (pessimistic) doesn't keep a record locked for too long?
>
>Things like that, or anything else you can advise me on.
>
>Much appreciated.
>Thanks
>Kev

Kev,
As with everything, it depends.

Most of the time I use optimistic buffering. For most systems I deal with, this is enough. The Tableupdate() return value is checked and if the update didn't take place for one reason or another (e.g. another user had the record locked or it had already been modified), the application informs the user and they can decide what to do.

I have also implemented pessimistic locking for some systems that the user needed/wanted something extra. They didn't want their users bogged down editing something that they weren't going to be able to save anyway. So an initial check is done to prevent this.

I prefer optimistic. IMO, its easier to implement.

And whether I use optimistic or pessimistic, I always use table buffering. There are too many commands in VFP that move the record pointer that would cause an implicit tableupdate. I want to control when that occurs.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform