ironfelix717
Registered User.
- Local time
- Today, 06:26
- Joined
- Sep 20, 2019
- Messages
- 193
Hi all,
I'm trying to ensure I fully understand how locking will work in a multi-user access environment (5-10 users) and to plan my code around it before I continue development.
This question is in reference to unbound forms. How do you pros write your code to handle conflicting updates, etc?
I came across a very interesting article that discusses how to handle concurrent update conflicts. He uses 2 routines that loop and try to edit/update the record until success is reached. here So that is an interesting approach. It appears the consensus among experienced devs is that conflicts rarely occur in a 5-10 user environment, so using optimistic locking is ideal.
I thought I would simulate one of these multi-user concurrent update/edits, but I wasn't able to produce any errors in quick testing. The attached db edits/updates a record in a table. Making 2 copies and opening them - I was not able to force a conflict and even played with the LockType on the RS object (which i know has an effect on this issue).
----------
To be clear: I am just trying to understand how you would professionally handle code that is meant to use recordsets and ensure there are no conflicts with other users, if there is, handle the error elegantly. I would rather develop this into the project early, than deal with it at a later date.
Thanks
I'm trying to ensure I fully understand how locking will work in a multi-user access environment (5-10 users) and to plan my code around it before I continue development.
This question is in reference to unbound forms. How do you pros write your code to handle conflicting updates, etc?
I came across a very interesting article that discusses how to handle concurrent update conflicts. He uses 2 routines that loop and try to edit/update the record until success is reached. here So that is an interesting approach. It appears the consensus among experienced devs is that conflicts rarely occur in a 5-10 user environment, so using optimistic locking is ideal.
I thought I would simulate one of these multi-user concurrent update/edits, but I wasn't able to produce any errors in quick testing. The attached db edits/updates a record in a table. Making 2 copies and opening them - I was not able to force a conflict and even played with the LockType on the RS object (which i know has an effect on this issue).
----------
To be clear: I am just trying to understand how you would professionally handle code that is meant to use recordsets and ensure there are no conflicts with other users, if there is, handle the error elegantly. I would rather develop this into the project early, than deal with it at a later date.
Thanks