Record Lock Problem
Record Lock Problem
(OP)
I am using pessimistic table buffering and when I want to access a locked record I get error 109. After this the application closes immediately. Has anyone a solution for this problem?
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS Come Join Us!Are you a
Computer / IT professional? Join Tek-Tips Forums!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines |
|
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Register now while it's still free!
Already a member? Close this window and log in.
RE: Record Lock Problem
I'm sure many folks here have some error handler routines already developed that they could share; its really the best long-term approach. Also explore the set reprocess command.
Robert Bradley
FoxDev - Visual FoxPro Development
RE: Record Lock Problem
RE: Record Lock Problem
I think jvalk's question is how to prevent the application from abruptly exiting.
jvalk,
set a breakpoint just before the attempt to access the locked record. Step through and see where and why it terminates.
Jon
RE: Record Lock Problem
Generally, the approach in your error handler would be to test for that error number (I assume your ON ERROR routine passes ERROR() as a parameter), then set up a loop for, say, 10 iterations, inserting a pause of a second or so within the loop, and issuing a RETRY each iteration.
However, one of the problems with pessimistic locking is that if someone starts editing, then gets up and goes to lunch, that hoses the other users - error handling will help you exit gracefully, but won't solve the underlying problem.
Robert Bradley
FoxDev - Visual FoxPro Development
RE: Record Lock Problem
1. SET MULTILOCKS ON
2. OPTIMISTIC TABLE BUEFFERING is generally the preferred method of buffering. Don't know if you checked it out
John Durbin
ICQ VFP ActiveList #73897253