Solved

Multi-user update in Access 2007, Locking issue

Posted on 2013-06-25
4
419 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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

726 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