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
191 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
Comment Utility
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
Comment Utility
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
Comment Utility
Adjusted points from 100 to 150
0
 

Author Comment

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

Expert Comment

by:djadja
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

8 Experts available now in Live!

Get 1:1 Help Now