473,583 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access 2003 Error: 3218 Could not update; currently locked


I have 2 users who ran into a problem with a data entry program
(written in Access 2003). One user was keying into one of the forms
when she got the message "ACCESS Error Number: 3218 Could not update;
currently locked'. About the same time, another user was keying
records into a 2nd form. Even though they were on different forms,
they would have added records to the same table.

The 2nd user had tried to add about 28 records, the first 13
successfully. She said that she did not get any type of error message
that her remaining records were not being added (even though I have
coded an error handler to trap errors). She only realized later that
the last 15 records she keyed were never added to the table.

There are about 3 main users of this application (a split database),
each with their own copy of the front end database, all accessing the
same back end database. There is no default record locking. The
option to "Open databases using record level locking" is checked.

First of all, is there any reason why user #2 would not get an error
message that her records were not being added? On another
application, I've had a similar problem on a single user application
that a particular field happened to be NULL when I attempted to add
the record to the table. Access did not add the record to the table
(which is correct), but it did not give me an error message.

Is this normal Access behavior? If so, any clues on how to handle this
situation?

TIA,

Stuart
Feb 15 '08 #1
6 11318
>>
Is this normal Access behavior? If so, any clues on how to handle this
situation?
<<

Yes - normal behavior for any system. Whenever you have multiple users
entering data into the same table at the same time you are going to have
collisions/write conflicts/dead locking...

The way to handle this is to prevent users from entering data into the
same table at the same time. But that is absurd! How would you get
anything done?

Easy - each user enters data into a local temp table. Then they take
turns submitting their data to the main data table on the backend DB.
This would require a flag on the main table when it is in use. For this
flag what you can do is to add a flag table to the backend database.
When a user is ready to submit their data your submit data procedure
would check this flag table to see if anyone is using it - if not then
copy their UserID to this table. When another user wants to submit
his/her data the program first checks this flag table to see if someone
is there first. If yes - pop up a message stating to try again - system
is busy (or something like that). When user 1 has completed submitting
his/her data - at the end of the submit procedure you Delete * from the
flag table. Then the next user can submit data. Then the next user ...
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Feb 15 '08 #2
Thanks for your response, but it seems that Access should be able to
handle this. Both users were adding records, and the locking appears
to be only record level, so why is it locking the entire table?

Also, why would the second user attempt to add 14-15 additional
records and still not get an error message? It appears after the
error message, it locked out all attempts by the other user to add any
records.
Feb 15 '08 #3
stuart <st***********@ ncmail.netwrote :
>The 2nd user had tried to add about 28 records, the first 13
successfully . She said that she did not get any type of error message
that her remaining records were not being added (even though I have
coded an error handler to trap errors). She only realized later that
the last 15 records she keyed were never added to the table.
Does the user add the records by opening a new form, entering data and then close the
form? If so put the following code in the close command button code before the
docmd.close

If me.dirty= true then _
docmd.runcomman d accmdsaverecord

This will trigger any messages before the form is closed.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Feb 17 '08 #4
stuart <st***********@ ncmail.netwrote :
>I have 2 users who ran into a problem with a data entry program
(written in Access 2003). One user was keying into one of the forms
when she got the message "ACCESS Error Number: 3218 Could not update;
currently locked'. About the same time, another user was keying
records into a 2nd form. Even though they were on different forms,
they would have added records to the same table.

The 2nd user had tried to add about 28 records, the first 13
successfully . She said that she did not get any type of error message
that her remaining records were not being added (even though I have
coded an error handler to trap errors). She only realized later that
the last 15 records she keyed were never added to the table.

There are about 3 main users of this application (a split database),
each with their own copy of the front end database, all accessing the
same back end database. There is no default record locking. The
option to "Open databases using record level locking" is checked.
There are some interesting reasons why record level locking doesn't always engage.
Although I haven't done a lot of research on this topic.

ACC2000: Access Database Does Not Use Record-Level Locking When Started from a
Windows Shortcut
http://support.microsoft.com/kb/238258

ACC2000: Record-Level Locking Does Not Appear to Work
http://support.microsoft.com/kb/225926/en-us

Although these may or may not apply to A2003.

Mind you it's been my experience with Jet 4.0 databases that inserted records
automatically go to their own page. Which is why they can bloat significantly.
Note however that this is subjective observation and I haven't done much objective
testing.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Feb 17 '08 #5
On Feb 17, 2:52*pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:
stuart <stuart.med...@ ncmail.netwrote :
The 2nd user had tried to add about 28 records, the first 13
successfully. *She said that she did not get any type of error message
that her remaining records were not being added (even though I have
coded an error handler to trap errors). *She only realized later that
the last 15 records she keyed were never added to the table.

Does the user add the records by opening a new form, entering data and then close the
form? *If so put the following code in the close command button code before the
docmd.close

If me.dirty= true then _
* * *docmd.runcomma nd accmdsaverecord

This will trigger any messages before the form is closed.

Tony

--
Tony Toews, Microsoft Access MVP
* *Please respond only in the newsgroups so that others can
read the entire thread of messages.
* *Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab. ca/accsmstr.htm
* *Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
Thanks Tony for your response. To answer your question, the 2 users
are on 2 different forms, but likely would be accessing the same table
to add records. On these 2 forms, the user will key in the data on
the form, hit 'Save', and then enter additional records (without
exiting the form).

Feb 18 '08 #6
st******@gmail. com wrote:
>Thanks Tony for your response. To answer your question, the 2 users
are on 2 different forms, but likely would be accessing the same table
to add records. On these 2 forms, the user will key in the data on
the form, hit 'Save', and then enter additional records (without
exiting the form).
Ok, then closing the form isn't causing the problem.

Darn, I was hoping for an easy although obscure fix. <smile>

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Feb 19 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
595
by: Thompson Yip | last post by:
From time to time, I randomly receive "Can't updated, Currently locked" error 3218 or 3246 from the following code in one of my form with pessimistic lock for 70 users environment. Any problem with the code? Private Sub Save_Record_Click() Dim stSQL As String Dim rs As Object Set rs = CreateObject("ADODB.Recordset")
6
4730
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
12
3082
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty asp editing (like I used to be able to do with 2K/IIS5) where I use VS.NET, open an asp file, make changes, save and refresh my browser. Problem...
0
7707
by: gm | last post by:
Immediately after generating the Access application from the Source Safe project I get: "-2147467259 Could not use ''; file already in use." If Access database closed and then reopened I get: "-2147467259 The database has been place in a state by user 'Admin' on machine ..... that prevents it from being opened or locked."
1
7899
by: amindi | last post by:
Hi, I wrote a VB6 program to read some data records from a Ms Access database and to write them into a SQL server database.(I use Ms Access 2000 and SQL server 2000).After reading each record in Access database, I update a text type datafield of that record in Access database to 'Y' (to mark the perticular record as a copied record)(The program...
2
4717
by: CWogksch | last post by:
Hello, Everyone... My name is Chris Wogksch. I have a point of sale application developed in VB6 using MS Access 2003 as the database. I've been running versions of this app for over eight years, using vb5/Access 97 and later vb6/Access 2000 and 2003, without issue. Recently, I've started selling my latest version to liquor stores in my...
0
1987
by: CWogksch | last post by:
Hello, Everyone... My name is Chris Wogksch. I have a point of sale application developed in VB6 using MS Access 2003 as the database. I've been running versions of this app for over eight years, using vb5/Access 97 and later vb6/Access 2000 and 2003, without issue. Recently, I've started selling my latest version to liquor stores in my...
1
1884
by: dixcyn04 | last post by:
Ok, now I've run into another little hiccup in my application. The ability to update records already in existance. What is bugging me about this, is the code I will submit was what I found on forums and suggestions here and there on the Internet and very similiar to what is suggested on this forum too. I've begun toi regret not having SQL...
3
3756
by: kasinisak | last post by:
I have created a Sub to export a query to a text file in the following steps: 1. Before the text file can be generated, certain checks must be made to ensure the correct result. 2. Generate a text file from a pre-built query 3. Update 'status' fields in three tables to reflect the change made by the code The problem I now encounter is that...
0
7894
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7824
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8176
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7931
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5699
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5370
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3816
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3841
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.