Solved

Error: "Another user edited this record"

Posted on 2009-05-18
1
220 Views
Last Modified: 2012-05-07
I have a linked Oracle table in Access application (via ODBC). There is a checkbox before each record, and there are a "select all" checkbox at the bottom of the page for selecting all the records.

The select checkbox is bound to "selected" field in Oracle table (0 or -1). And "select all" checkbox is bound to a query to update "status" of all records to 0 or -1. Everything seems good, except sometimes, when you check one record, and select "select all records", it will display error messages like:
1. "The data has been changed: Another user edited this record and saved the changes before you attempted to save your changes. Re-edit the record"
2. run-time error '3197' "the microsoft jet database engine stopped the process because you and another user are attempting to change the same data at the same time."

This is a serious problem, I kind of know it's beecause access will store the table in its cache, and if the selected status change, it will report "Another user edited this record". But could anyone give me detailed solution for this problem? Thanks a lot.
0
Comment
Question by:heyday2004
1 Comment
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 24421113
In Access, you should either (a) perform ALL data manipulation in your form or (b) perform ALL data manipulation through queries/code, but you should NOT combine the two. This is the cause of the error - while there may be only one user (yourself) working in the db at the same time, that user is trying to manipulate the same dataset in two different places (i.e. your form and your query), so Access considers that to be 2 users.

You can try issuing a Save before you execute your "UpdateAll" query:

Me.Dirty = False
<now run your query to update all the records>

This forces Access to save any pending changes. However, since you're working with ORacle, you may still have some issues with this depending on the refresh intervals and such. However, this typically takes care of it.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now