Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-user locking conflict on network?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Multi-user locking conflict on network?
Miscellaneous
Thread ID:
00356520
Message ID:
00356520
Views:
42
If I run the same form (.EXE) at the same time I get a "Attempting record lock... Press ESC to Cancel" error when I start the second copy of the form .EXE running.

I am using pessimistic buffering with SET MULTILOCKS ON. I put the conflict record locking error checking in my Edit button. So that when a user tries to Edit the same record as another user they get a message that the record is already being edited at another workstation. That works.

The part that doesn't work is Form Init brings me to my first record and it displays it on the Form. When I start the second edition of the same form, it gives me that "Attempting record lock" error during Form Init before it even displays the record. Which I understand is happening because the same record is already in use by another user.

I do the same thing with a different form without any problems or record lock conflicts. The only difference between the form that works well on the network and the one that doesn't is the fact that the non-working form contains the command COPY TO ARRAY. Which I understand does some sort of lock on the table/records in the table.

I tried UNLOCK and SET LOCK OFF and so forth, but I think I need to find a way to allow two users using pessimistic buffering to access the same record at the same time as long as they are not in edit mode, but with pessimistic buffering it looks like that can't work that way. I don't want to use optimistic buffering because the record spans several forms and someone would input a lot of data before finding out they could not save the record because another user was already updating the record.

I check for the 108 and 109 errors when the Edit Record button is pressed. And I do an UNLOCK when my Save Record button is pressed. As I stated before the Form Init without the COPY TO ARRAY command works like a champ for adding, editing and deleting records in a multi-user network environment.

Did you get all of that? Anyone got any ideas for me? Thanks for the help.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Next
Reply
Map
View

Click here to load this message in the networking platform