Solved Sync/delivery problems multiple users editing the same Access form.

Danylo

New member
Local time
Today, 23:12
Joined
Jun 22, 2023
Messages
17
My problem is connected to multi-users accessing to one form and editing data on it simultaneously.

The root of the problem is that, when several users are connecting to the DB, the last one who connects obtain a "priority". As a result, whenever one of the users is editing a field in form and save the changes, after what happens synchronization of data stored on the server for each user except the one with "priority". But if prioritized user ( the last connected ) is making a change, everybody will synchronize with his change.

Currently there are 5 active DB users, the database is split and shared, so the tables are stored on virtual driver and everyone have access to it, each user has a local copy of an Access database file that contains links to the tables, along with queries, forms, reports, and other database objects. There are more than 70 tables, and part of them holds over a thousand of records. Commonly, work related to DB focuses on data entry.

As a first step, lock system were implemented, we used lock on "Edited record", which seems to work properly, so no matter whether it's prioritized user or not, as soon as that user start to change data in a form he is locking it, but after that user made the change and saved data if he don't have the "priority" his change won't be applied to prioritized user.

In order to clear up the problem, i will simulate a problem situation: User1, User2, User3 accessing DB in the appropriate sequence. User3 gaining "priority". Every user accessing form of the same PO, and trying to change Supplier field. User2 was the first one to make the change , so he is locking the record. After the change was made and data was saved. Synchronization happens to User1 and he receives changed data about supplier, but User3(prioritized) keeps the old data. Then we repeat the process , but now User3 are making changes. At the end, after synchronization, both User1 and User2 receives newest Supplier data.

As an addition I'm sharing the link which contain the video of the problem:
.Sadly the quality is poor so as an explanation to what's going on: firstly, the record status is changed by 'Prioritized' User2 from "Editing" (blue) to "Validation" (yellow) and saved after what User1 synchronizing the data and receives the change, after that User1 is changing and saving the data but nothing happens on synchronization for User2, so at the end 2 users stay with 2 different record versions.

Also, sometimes when ‘uprioritized’ user ( User1) are making the changes and User2 keeps an old unchanged data, after User2 decide to make synchronization either by button or just exit from the form or the automatic synchronization happens, old unchanged data becomes saved and each user receives it.

So as a conclusion to all of that , MS Access Optimistic Concurrency Control (Optimistic locking), to be more precise Last in Wins approach is not working properly.


After additional research, I found out that on each user entrance .laccdb file responsible for "Microsoft Access Record-Locking Information" each user gains Admin status, may it be the cause of ‘priority’ problem?

Is there a away to solve that issue without implementing custom locking or Optimistic Concurrency Control approach, such as timestamps use?


For additional information and suggested solutions, I've posted same issue on Microsoft forum. I didn't mean to harm anyone's feeling, by doing that, I found each reply very useful, and the only reason for doing that is to gain as much information as possible, since I'm really new to Access and DB overall, and there is so much information to be covered.
P.S. Sadly I can't insert a link, since I've been receiving "inadmissible context" error, thankfully XPS35 mentioned that link.
Solution:

The root of the problem is a wrong sharing approach (using QNAP NAS to hold BE), during the test with LAN sharing, the issue disappeared.
 
Last edited:
Is your database split into front-end and backend?

And does each user heave their own copy of the front-end?


Currently there are 5 active DB users, the database is split and shared, so the tables are stored on virtual driver and everyone have access to it, each user has a local copy of an Access database file
Sorry, managed to miss all that!
 
Last edited:
Pat beat me to it, so I will merely concur with her response. Access + Cloud is a disaster waiting to happen. Those places that CLAIM that they allow Access + Cloud to work aren't telling you the whole story.

Here is the short technical answer. Cloud-based storage doesn't use the protocol call Server Message Block (any version thereof), and SMB is the basis for ALL repeat ALL Windows file sharing and printer sharing technology. If the Cloud server won't allow SMB connections, you WILL repeat WILL corrupt your database quickly. Cloud servers usually allow FTP or HTTP variants (which are whole-file sharing methods), but they do not use SMB (which is a partial-file sharing method).
 
Access + Cloud is a disaster waiting to happen
You CANNOT share an Access database using Cloud technology... DO NOT DO THIS. It is a huge risk
Mind elaborating why you believe this is a cloud issue?

OP:
Here's my 1.5 cents, when something in Access does not work, which is not uncommon, implement it yourself. Lock your records in a custom way, make a table where you can store which records should be locked and also release the locks using a custom method. That way you have full control. Just make sure to implement tests regularly, so you can verify things are functioning correctly and research concurrent programming if you haven't already.
 
Mind elaborating why you believe this is a cloud issue?

OP:
Here's my 1.5 cents, when something in Access does not work, which is not uncommon, implement it yourself. Lock your records in a custom way, make a table where you can store which records should be locked and also release the locks using a custom method. That way you have full control. Just make sure to implement tests regularly, so you can verify things are functioning correctly and research concurrent programming if you haven't already.

1. It is not uncommon to call a cloud drive a "virtual" drive, which is how the OP described it.

2. Give yourself a full 2 cents on that idea, within limits... the limits being that you have to have a good reason to believe you are running into a true data sync problem that requires unusual locking. NORMALLY the Windows/Access locking scheme is adequate, particularly if you set the record-locking attributes correctly for your queries and forms. But you DID say "when something ... doesn't work" so a custom method of locking IS a possible response in that case.
 
@Danylo - Not only did you post the same question on another forum, but you got a lot of answers, including one that described the pitfalls of allowing multiple users to edit the same record at the same time from two different client computers. This should NEVER EVER happen in ANY data management system. The old phrase "too many cooks spoil the broth" comes to mind, as does "too many chiefs, not enough indians." The technical name for the effect is "destructive interference" which is what happens when "the left hand doesn't know what the right hand is doing."

Allowing multiple users the ability to modify the same record at the same time is a disaster waiting to happen because the "priority" that YOU describe is basically a way of saying "who gets the lock first?" - and it is a decision that occurs at network speeds because your 5 users are all remote with respect to the file server holding your file. The file server that "owns" the back-end file is also the server that owns the file locks because that is the way that Windows works. So all decisions are made in the back-end server.

Everything will be measured in milliseconds because that is how long it takes a system to resolve network lock disputes. From your description of the work flow, it might as well be random as to who is on first. To expect order out of this chaos is unrealistic without a formal "pre-lock" and "post-lock" pair of actions to guarantee exclusive access to a particular record. Which opens up ANOTHER can of worms as now you have THREE transactions that have to occur - the lock, the update, and the unlock. This is just multiplying trouble because if you have gone this far, you now have to worry not only about the original change but also the lock and unlock transactions having issues. This design cascades quickly.

Oddly enough, in this thread and in the other thread, you never clarified exactly what you meant by a virtual drive or virtual driver. So let's ask right now... are you talking about a cloud-based server for your back-end files?

And finally, you are new to us, so you might not know this - but we consider it impolite to post a question which has already been asked and answered on another forum. We call this cross-posting. It is a way to waste the time of people who volunteer to help others out of the kindness of their hearts. The proper way to handle this would be to state your problem but ALSO state that you asked in another forum but so far have not gotten any usable answers. Then post a link to the thread in the other forum so we can see what has been suggested and maybe offer something else than what you've hear before.
 
@Pat Hartman
I will rewrite what I said from:
when something in Access does not work, which is not uncommon, implement it yourself.
To:
when something in Access does not work, or when its opinionated nature conflicts with a part of your software architecture, which are not uncommon scenarios, implement the feature yourself.

Let's not go down the path of me vs you. Thanks for your clarification on why you suspect this is a cloud issue.
 
@The_Doc_Man as we all know, Jet/ACE use the lock file to synchronize updates. The lock file keeps track of who is dong what to which rows. That is why in order for Jet/ACE to actually share a database, the lockfile has to be created in the folder that holds the BE database and must be sharible and updateable by all users. The issue with the cloud is that copies of the database are made for each separate user and there is no commonly shared lock file.

I know that intimately well and have posted on Windows and Access locking mechanisms. However, there have been times when it was necessary to "reserve" a record (temporarily) to do several "related-record" edits. Hey, it's a rare bird, but sometimes that is what you have to do meet the customer's requirements. But you will note that I also replied to 561414 that it would be rare to take it that far. In the world of dealing with customers, "NEVER" is an impossible word. On the other hand, "WILL COST THREE TIMES AS MUCH AS DOING IT NORMALLY" often works.
 
Danylo,

I hope that the responses in this thread and in the Microsoft Community thread have answered your request. It seems you moved to AWF today hoping to get different results.
As Peter said in post #2, it is considered proper netiquette to advise readers that you have posted in multiple forums.
I believe a review of your business process that is requiring simultaneous update to a record is in order.

Good luck with your project and belated welcome to this forum.
 
The point Doc, is that if there is not a common place to store lock information, then you have no way to control sharing. Edgar was implying that there would be some magical way of YOU coding something that the cloud technologies simply do not support. Are you saying that you can suggest a method that makes an Access database safely shareable using a cloud drive?
Yes. Make it single access at a time and force users to use a telephone to coordinate it. They will quickly get frustrated and try a CITRIX or RDP method instead.
 
You previously posted your question on another forum ...
Thank you for pointing that mistake I've made, I fully share your opinion. I just was in hurry to post the issue thread, and due to spreading the attention between the main project and that issue, I may need a little bit longer time to answer on supposed solution, but I really appreciate all the help provided by each member of the community.
 
STOP ---- You CANNOT share an Access database using Cloud technology. STOP or risk corruption and data loss. Only Windows can support sharing an Access database.

If your users are not all on the same LAN, your options to share are limited to Citrix or Remote Desktop. If your BE does not have tables that contain more than about 5000 rows, you can convert the BE to SharePoint. Some people have reported success using Azure as the BE but others complain that this is much like watching paint dry.

But there is total consensus on the use of cloud technology to share an Access application - DO NOT DO THIS. It is a huge risk.
Thank you for your reply. To be more precise BE is stored on QNAP NAS situated on different building, by itself it's cloud storage solution, on which there is a folder with BE part of the DB, after that each user is connected to that shared folder by IP. About why such approach was used, I cannot explain, since that issue its' my first attempt to work with mentioned DB.
 
Last edited:
Pat beat me to it, so I will merely concur with her response. Access + Cloud is a disaster waiting to happen. Those places that CLAIM that they allow Access + Cloud to work aren't telling you the whole story.

Here is the short technical answer. Cloud-based storage doesn't use the protocol call Server Message Block (any version thereof), and SMB is the basis for ALL repeat ALL Windows file sharing and printer sharing technology. If the Cloud server won't allow SMB connections, you WILL repeat WILL corrupt your database quickly. Cloud servers usually allow FTP or HTTP variants (which are whole-file sharing methods), but they do not use SMB (which is a partial-file sharing method).
Thank you for your reply. As I mentioned in my previous reply BE is stored on QNAP NAS situated on different building, by itself it's cloud storage solution, on which there is a folder with BE part of the DB, after that each user is connected to that shared folder by IP, and it's done to let users work with DB remotely, but is still don't know a lot about all of that, since its my first attempts to work with such approach and Access.
 
Last edited:
Mind elaborating why you believe this is a cloud issue?

OP:
Here's my 1.5 cents, when something in Access does not work, which is not uncommon, implement it yourself. Lock your records in a custom way, make a table where you can store which records should be locked and also release the locks using a custom method. That way you have full control. Just make sure to implement tests regularly, so you can verify things are functioning correctly and research concurrent programming if you haven't already.
Thank you for your reply, I share your opinion and solution. During attempts to solve the issue, my colleague and I tried different locks configuration, and it seems to solve part of the problem but we still have issue that 'priority' user doesn't receive the changes made by other users. If there is no simple solution, I believe timestamp as optimistic lock implementation can become a good beginning.
 
Last edited:
1. It is not uncommon to call a cloud drive a "virtual" drive, which is how the OP described it.

2. Give yourself a full 2 cents on that idea, within limits... the limits being that you have to have a good reason to believe you are running into a true data sync problem that requires unusual locking. NORMALLY the Windows/Access locking scheme is adequate, particularly if you set the record-locking attributes correctly for your queries and forms. But you DID say "when something ... doesn't work" so a custom method of locking IS a possible response in that case.
As I mentioned in the issue description, built-in record-locking is really useful but they don't fully solve the issue.
 
How are your remote users connecting to the Database ? VPN?
If so, they will probably be on a slow connection which will no doubt be a significant cause of your issues.

From a big-picture perspective, I still have to question the database design/business process that requires 3 or more different people to be working on the same record at the same time?
Can you elaborate so we could perhaps make sensible suggestions to avoid the issue in the first place?
 
@Danylo - Not only did you post the same question on another forum, but you got a lot of answers, including one that described the pitfalls of allowing multiple users to edit the same record at the same time from two different client computers. This should NEVER EVER happen in ANY data management system. The old phrase "too many cooks spoil the broth" comes to mind, as does "too many chiefs, not enough indians." The technical name for the effect is "destructive interference" which is what happens when "the left hand doesn't know what the right hand is doing."

Allowing multiple users the ability to modify the same record at the same time is a disaster waiting to happen because the "priority" that YOU describe is basically a way of saying "who gets the lock first?" - and it is a decision that occurs at network speeds because your 5 users are all remote with respect to the file server holding your file. The file server that "owns" the back-end file is also the server that owns the file locks because that is the way that Windows works. So all decisions are made in the back-end server.

Everything will be measured in milliseconds because that is how long it takes a system to resolve network lock disputes. From your description of the work flow, it might as well be random as to who is on first. To expect order out of this chaos is unrealistic without a formal "pre-lock" and "post-lock" pair of actions to guarantee exclusive access to a particular record. Which opens up ANOTHER can of worms as now you have THREE transactions that have to occur - the lock, the update, and the unlock. This is just multiplying trouble because if you have gone this far, you now have to worry not only about the original change but also the lock and unlock transactions having issues. This design cascades quickly.

Oddly enough, in this thread and in the other thread, you never clarified exactly what you meant by a virtual drive or virtual driver. So let's ask right now... are you talking about a cloud-based server for your back-end files?

And finally, you are new to us, so you might not know this - but we consider it impolite to post a question which has already been asked and answered on another forum. We call this cross-posting. It is a way to waste the time of people who volunteer to help others out of the kindness of their hearts. The proper way to handle this would be to state your problem but ALSO state that you asked in another forum but so far have not gotten any usable answers. Then post a link to the thread in the other forum so we can see what has been suggested and maybe offer something else than what you've hear before.
I understand that using multi-user simultaneous approach in Access is a really bad idea, since regarding the information I've gained in the last days, access not really a suitable solution for multi-user simultaneous work no matter if there is locking system or not. But I'm still confused about what may cause such simple approach as Last in Wins as Optimistic locking solution to work incorrectly.

Regarding posting on different forums and not mentioning that, as I tried to explain, it was unfortunate mistake, and I'm sorry about that. I didn't mean to harm anyone's feeling, the only reason why I decided to repost the issue on the forum is to gain as much useful information from different communities as possible, since I'm really new to Access and DB overall, and there is so many information to be covered.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom