Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
209 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
[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
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 300 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

688 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