Solved

Multi-user update in Access 2007, Locking issue

Posted on 2013-06-25
4
420 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 58
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 58

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

688 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