Solved

Multi-user update in Access 2007, Locking issue

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

860 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