Solved

Error: "Another user edited this record"

Posted on 2009-05-18
1
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 85

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

734 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