Multi-user update in Access 2007, Locking issue

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
maximyshkaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Jim Dettman (Microsoft MVP/ EE MVE)Connect With a Mentor PresidentCommented:
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
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<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
 
maximyshkaAuthor Commented:
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
 
maximyshkaAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.