Solved

Multi-user update in Access 2007, Locking issue

Posted on 2013-06-25
4
415 Views
Last Modified: 2013-07-02
Hi.  I have a table with more than 1000000 records in Access 2007 database. This table should be simultaneously updated by multiple users. Data has following format: officers update multiple accounts (many to one).  Due to business requirements account information reflect data which should be updated constantly by multiple users.

Combined query which is listed below based on Cartesian product leads constant looking issue (Note: the actual data which I have cannot be provided).

Questions:

1.Is there a better approach to design schema.  I have to use Cartesian product in order to put foreign key of officer ID to each account number.
2. Is there any way to avoid locking issue and increase speed of records retrieval: I did the following work
2.1. I Split database between front end and back end, removed any locks (although the best would be to use edit records locking, open database in shared mode
2.2. I consider to do some work similar to replication, but it does not guaranty the locks will be removed.
2.3. I Used indexes
3. Please note that databases have to be put on network which will increase traffic

Account Number         Officer ID
1       11
2       11
3       11
4       11
5       11
6       11
7        11
8      11
9      12
10      12
11      12
12       12
13      12
14       12
15      12
16      12

If data will be messed, account 1-8 handled by officer 11, account 9-16 handled by officer 12
0
Comment
Question by:maximyshka
  • 2
  • 2
4 Comments
 
LVL 57
ID: 39274430
<<1.Is there a better approach to design schema.  I have to use Cartesian product in order to put foreign key of officer ID to each account number.>>

 Hard to say without seeing the table design and understand what it is you modeled.

<<2. Is there any way to avoid locking issue and increase speed of records retrieval: I did the following work>>

  Again, without seeing the design, that's the best you can do.  You cannot turn locking off.  "No Locks" in a form means no Edit locks, not that there is nothing being locked.

  You could try wrapping your updates in transactions and add re-try code if an update error occurs (you hit a lock, it rolls back, then attempts the update again, and does that X number of times before giving up)

Jim.
0
 

Author Comment

by:maximyshka
ID: 39283305
Hi Jim
I cannot provide you actual design.  I think the best to do the work similar to replication.  Have local copies for each user, only give them a linked copy of each master table.

BTW do you know how to change following query

Select field1, field2 into qry1-[Select User Name]
From table1
where user=[Select User Name]

I'm not sure if I can add parameter "User Name" to Qry1. As you understand Name of the table should be "qry1-user"

For user you may try any name.

My Goal is to automatically run procedure which will create all needed temp files which can be linked later for each user
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39284766
You would have to construct the SQL statement in code to do something like that.

Example:

Dim strSQL as string

strSQL = "Select field1, field2 into qry1-[" & CurrentUser() & "] From table1 where user= '" & CurrentUser() & "'"

 and then execute that or save it in a querydef

Jim.
0
 

Author Comment

by:maximyshka
ID: 39287779
Thanks Jim

This may work for 10 users. Do you have any suggestion if number of users will increase up to 40.

*** I created database and put some data.  Would you please look to the code.  I believe that something missing.
New-Microsoft-Access-Database.accdb
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now