So I developed this Access 2007 application with approximately 2 forms, many VBAs A bunch of codes and tables.
The business now wants to drive a network to run it (for example, G:: please call). My current solution (which I have already implemented, has the same table as:
__________________ | setting | value | ================= Update = 1 User 1 Then let me give you a reference. When the application runs, there is a button called "Update" which updates the local table from the remote table so that we Applying Filtering Now when two people (user 1, user2) launch the application, and a person If click on update, then the update field is set to true, and updateby is set to their name. Therefore user number 2 update It tries to check if the update field is correct, if it is, then it gives them a message (user two, not the user).
This Works right now, but here's the problem: Let's say the user is updating 1, and up Sector Set program at the stops (or is it vertical) or hampered in power, the application true field to update. Now it does not matter who launches it, they can not update because its " already updated "
Do you think about solving this Can you? Maybe an alternate solution?
Consider a different locking strategy In the event of a click on your "update" button, DBDenyWrite + dbDenyRead option can open a record set based on your tblUpdateStatus (the table in which you are writing UpdateBy).
set rst = Db.OpenRecordset ("tblUpdateStatus", _ dbOpenTable, dbDenyWrite + dbDenyRead) Then perform your other operations for the "Update" button . After this, close the records and release ... which releases the tblUpdateStatus lock.
Trace the error when a user is unable to open the record set (because the other user has a table lock), give them a message then try again and exit your click event sub-routine.
With this approach, when user1 locks tblUpdateStatus but gets out of the logically inaccessible, then it is issued lock on tblUpdateStatus. You may not need to update tblUpdateStatus, unless you want to record which user has locked it
(access to cookbook).
Comments
Post a Comment