473,416 Members | 1,547 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,416 software developers and data experts.

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 11300
>>
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.runcommand 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...@telusplanet.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.runcommand 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
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...
6
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...
12
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...
0
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:...
1
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...
2
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...
0
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...
1
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...
3
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...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.