I know nothing about ADO but here's a wild stab in the dark.

The message you're getting "The specified row could not be located for
updating" seems to be just another version of the "Record changed by another
user" and "Couldn't edit because another user changed the record" messages.
These appear whenever you're not updating with the key you think you are,
among other circumstances.  Specifically, if you're inserting into a table
with the unique key being a serial/autoinc field or using rowids/identities
then you can get this message (because your application is not being updated
with the real row id from the database after insert, any subsequent delete
or update will fail), or if a stored procedure changed the id of your
inserted row.  Try comparing the value of your inserted row in the TADOTable
against the real value in the database, and any differences may steer you
towards the answer.

Hope that helps a bit...

Cheers,
Carl

-----Original Message-----
From: Chris Crowe [mailto:[EMAIL PROTECTED]]
Sent: Monday, 10 January 2000 15:56
To: Multiple recipients of list delphi
Subject: [DUG]: ADO Express Table - Errors returned when deleting the
record.
Importance: High


I am getting a strange error when I try to delete a record.

This is what I have done

1) Drop on a TADO Table, and Connection Object
2) drop on a TDataSource, and link to the TADO Table
3) Drop on a TDBGrid and align to the client
4) Drop on a TDBNavigator and align to the top
5) Set the connection Object to use this connection string

Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;User
ID=Admin;Data Source=E:\Projects\Delphi\Delphi
5\AdrockCallCentral\DB\AdrockCallCentral.MDB;Mode=Share Deny None;Extended
Properties=";COUNTRY=0;CP=1252;LANGID=0x0409";Locale Identifier=1033;Jet
OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database
Password="";Jet OLEDB:Global Partial Bulk Ops=2

6) Set the TableName property to a table, and open the table
7) Run the program

7) Add a new record
8) Post the changes to the record
9) Delete the record

I then get this error:

Exception: EDatabaseError

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

What can I do to stop this?, I am at a loss here.

Chris

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to