Solved

Error: "Another user edited this record"

Posted on 2009-05-18
1
221 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

914 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

12 Experts available now in Live!

Get 1:1 Help Now