473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Access DB locking in Multiuser Environment

4
The Situation:
Peer to Peer Network (no Server)
Access 2000 DB running on one PC, is accessed by up to 5 users (not FE/BE)
I have written the system - my first in Access.
Farily heavy usage - 500 to 600 updates per day (is that heavy ? I dunno!)
I have about 100 linked databases - 1 database per client.
The linked client databases live in a folder in the same area as the "master" DB

All was fine up until about 6 months ago when...

The Problem:
The system just keeps locking !! and it seems to be getting worse - about 4 times today. All my staff have to exit Access and the "master" PC has to be rebooted in order to get back on. At first we blamed it on going into the same client at the same time - but it sometimes seems to lock up when someone goes into a linked DB (i.e. client record) 20 seconds after that last person came out.

Its driving me (and my staff) mad !!

Any help gratefully received

Chris
Jun 6 '07 #1
6 4727
puppydogbuddy
1,923 Expert 1GB
The Situation:
Peer to Peer Network (no Server)
Access 2000 DB running on one PC, is accessed by up to 5 users (not FE/BE)
I have written the system - my first in Access.
Farily heavy usage - 500 to 600 updates per day (is that heavy ? I dunno!)
I have about 100 linked databases - 1 database per client.
The linked client databases live in a folder in the same area as the "master" DB

All was fine up until about 6 months ago when...

The Problem:
The system just keeps locking !! and it seems to be getting worse - about 4 times today. All my staff have to exit Access and the "master" PC has to be rebooted in order to get back on. At first we blamed it on going into the same client at the same time - but it sometimes seems to lock up when someone goes into a linked DB (i.e. client record) 20 seconds after that last person came out.

Its driving me (and my staff) mad !!

Any help gratefully received

Chris
Conventional wisdom says Access is not reliable in a multi-user shared environment unless it split into FE/BE. You seem to know that, and still seem to want to run the risk of DB corruption, so I won't pursue that line of thought here, except to give you a link to an excellent article by Albert Kallal on splitting your DB.

http://www.members.shaw.ca/AlbertKal...plit/index.htm
(http://www.members.shaw.ca/AlbertKallal/Articles/split/index.htm)

If you are going to continue using Access without splitting it, then I hope that each user has his/her own copy of MS ACCESS on their local PC. For your lock conflicts, see below for a trick method of reducing general locking conflicts that I obtained from the tips page of www.aadconsulting.com that involves creating a combobox and a textbox, and adding the code shown below. This trick might solve your problem with the locking....no guarantees.

What's in the .ldb file
For every Access database opened for shared use, an .ldb file is created to store computer and login names, and to place extended byte range locks. The .ldb file always has the same name as the opened .mdb and is located in the same folder.

The Jet database engine uses .ldb file information to prevent users from writing data to pages that other users have locked, and to determine who has other pages locked. If Jet detects a lock conflict with another user, it reads the .ldb file to get the computer and login name of the user who has the file or record locked.

In most lock conflict situations, Access raise a generic Write conflict message that allows you to save the record, copy it to the Clipboard, or drop the changes you made. In some circumstances, you may receive the following error message:

Couldn't lock table <table name>; currently in use by user <security name> on computer <computer name>.
1. In the form create a TextBox that sits exactly over the ComboBox

2. Set the ComboBox's Visible property to False

3. The TextBox is Visible and holds a value according to needs of the application: it may be a bound control or, as in the sample code below, unbound with the value assigned on the Form_Load event.

4. Clicking on the TextBox hides it and displays the ComboBox. After the user has updated the ComboBox, the value is assigned to the TextBox and the ComboBox hidden again.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.     Me!txtHideShow.SetFocus
  3.     Me!txtHideShow.Text = "Test"
  4. End Sub
  5.  
  6. Private Sub txtHideShow_Click()
  7.     Me!cmbHideShow.Value = Me.txtHideShow.Value
  8.     Me!cmbHideShow.Visible = True
  9.     Me!cmbHideShow.SetFocus
  10.     Me!txtHideShow.Visible = False
  11. End Sub
  12.  
  13. Private Sub cmbHideShow_AfterUpdate()
  14.     Me!txtHideShow.Value = Me.cmbHideShow
  15.     Me!txtHideShow.Visible = True
  16.     Me!txtHideShow.SetFocus
  17.     Me!cmbHideShow.Visible = False
  18. End Sub
  19.  
Jun 6 '07 #2
ChrisA
4
Thanks for that.

It seems that conventional wisdom is going to win! and I think I will look into splitting the DB.

Regarding the latter part of your answer - we're not getting a locking error, at all, ever. So I'm not convinced it's a locking problem?

Maybe I should have used the word "hanging" in my original post rather than locking.

Also, I've just run a routine on my linked databases (100 or so of them) to compact and repair. It's reduced the database folder from 130mb to 27mb - I don't know if that will help - time will tell

Anyway, thanks again for the advice.
Jun 6 '07 #3
puppydogbuddy
1,923 Expert 1GB
Chris,

Your statement below changes everything:

Maybe I should have used the word "hanging" in my original post rather than locking.

Yes, you should have. Daily compact & repair, and refreshing of your table links (using VBA Code) should improve your system performance.
Jun 6 '07 #4
cyberdwarf
218 Expert 100+
Chris

Just a quick thought...

You should think seriously about using SQL Server 2005 Express as your data engine and using Access as your front-end app. Lots of good reasons for doing this (some have been raised in this thread).

There are some well-trodden paths along this route and the gotchas are pretty well known. Also SQL Express is FREE!

HTH

Steve
Jun 6 '07 #5
ChrisA
4
Thanks again.

I will implement the "compact and repair" as a daily task. I'll find out how to refresh the links by code (havne't done this before) and try that too.
Jun 7 '07 #6
ChrisA
4
Thanks Steve,

I've got SQL Server express on my machine. So I'll have a look at that - during a quiet moment (that'll be May 2009 at this rate!)

Thanks for your help
Jun 7 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Fred | last post by:
I have a database with reports that I want to have accessible on a website, preferably searchable on the website. Can Access databases be put on Unix machines and work without using Perl? Any easy...
17
by: Jon Ole Hedne | last post by:
I have worked on this problem some hours now (read many-many...), and I can't solve it: In vba-code I create a table with Connection.Execute, and add some data to it. This table is saved in the...
2
by: Jennifer B. | last post by:
Hi Every Body: I hope this is to the right post. I apologize if I am incorrect. Could anyone please answer one or any of the following questions for Access 2003: - Maximum size of an...
8
by: David Kistner | last post by:
I'm fairly new to Access (I've worked with Oracle and MySQL in the past). I was asked to build an application for a small office and told that I had to use Access 2002. I was VERY uncomfortable...
9
by: Paul | last post by:
I am in need of some advice please: I have a client who wants to use Access 2k and 2k3 on their workstations. The appication will be written using Access 2k. My client has the following setup:...
3
by: SecretCharacter | last post by:
I have a project going on to store data for inventory information. Creating a database with access makes me realise all things like the data tables and user interface(forms) and queries are all...
2
by: Smriti Dev | last post by:
Hi, I wanted find out if it is possible to have many users access an access database and add records using forms. I'm worried their might be data corruption. I will have about 5 users using the...
1
by: jy | last post by:
I have converted my Access database into *.mde format. However, my colleague can’t seem to open the file. The message shows that another user has opened it in exclusive mode. However, the file is...
1
by: blad3runn69 | last post by:
Hi was hoping someone could shed a bit more light on ms access record locking 'Lock the edited record' option is very misleading - when you read the help file it actually states (from 'About...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.