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
194 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 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