Consider the following scenario (it is contrived to highlight the potential issue):
I have a
backend.accdb MS Access DB that contains all data tables. Let's consider this to be an address contacts list, with at least a table of contacts with a primary key on
ContactsTable.Id. I also have two client MS Access files, each with reports and forms that query
backend.accdb. How do I avoid data entry read-write overlap concurrency issues (analogous to multiple threads accessing program shared variables)?
i) each client queries
backend.ContactsTable for the same entry as specified by
ii) Each client takes the current value of a field
SeenCount for this entry and increments it.
It is possible for both clients to read the same value and increment it, however the value should have been incremented twice.
How do I avoid such concurrency issues and what is best practice?