Solved

ADOTable erro message: The specified row could not be located for updating; Some values may have been changed since it was last read.

Posted on 2000-03-01
5
193 Views
Last Modified: 2008-03-17
Hi there,

I'm working with ADO tables, and when I update the row, I get a message:

The specified row could not be located for updating; Some values may have been changed since it was last read.

I readed some "help" for the same problem at Visual Basic and how to solve it with Resync method, but the same method I can't call on Delphi.

Thanks
0
Comment
Question by:isaka
5 Comments
 
LVL 2

Expert Comment

by:mullet_attack
ID: 2618295
Problem occurs because you are using an autoinc field in your table and the ADO datset does not re-read the record after it is written. So when you try to edit the record later, the dataset doesn't know the value for that field, assumes it to be zero, and bang -> error !

Try This:

procedure TForm1.ADOTable1AfterPost
DataSet: TDataSet);
begin
  TCustomAdoDataSet(dataset).requery;
end;

This will stop your error, however the downside is that the current record is reset to the first record. Solve that by using bookmarks etc and logic that is particular to your app.
0
 

Accepted Solution

by:
garybalsamo earned 150 total points
ID: 2624498
I receive this same error, but for different reasons.

I found that I would get this message more if I used Access 97 files instead of Access 2000.

- NEXT -

If you table does not have a Primary Index, adding one has also stopped this error message for me.
0
 

Author Comment

by:isaka
ID: 2912069
Adjusted points from 100 to 150
0
 

Author Comment

by:isaka
ID: 2912070
If I use the bookmark than I have very ofen message that the bookmark is invalid.
Any suggestions?
0
 

Expert Comment

by:djadja
ID: 3481043
I take it another user hasn't updated the record?

Do you move off the record in any way from any other event?
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

Suggested Solutions

Title # Comments Views Activity
how do i create updater to My Activex application? 3 79
oracle global variables 4 63
creating threads in delphi 1 81
FMX and jaudiotracker playing memory stream 29 66
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

929 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

11 Experts available now in Live!

Get 1:1 Help Now