Re: Row can not be located ... on Delete



Eugene,

Inserting/Updating/Deleting data from a joined query can be tricky and
dangerous if it worked (ADO may delete records from all the joined tables).
I recommend using TClientDatasets
(TADODataSet->TDataSetProvider->TClientDataSet) to better control how the
underlying insert/update/delete scripts are built.

http://dn.codegear.com/article/22571
http://dn.codegear.com/article/20847

Good luck,
krf

"Eugene V. Goldberg" <egold@xxxxxxxxx> wrote in message
news:4815ab71$1@xxxxxxxxxxxxxxxxxxxxxxxxx
D5, MS SQL 2000.

I have a dataset which joins 3 tables:

SELECT CIV_HEAD.*, CIV_PLAINTIFF.LAST_NAME,
CIV_PLAINTIFF.FIRST_NAME, CIV_PLAINTIFF.MIDDLE_NAME,
CIV_DEFENDANT.BUSINESS_NAME, CIV_DEFENDANT.LAST_NAME,
CIV_DEFENDANT.FIRST_NAME, CIV_DEFENDANT.MIDDLE_NAME
FROM CIV_HEAD LEFT JOIN CIV_PLAINTIFF ON CIV_HEAD.ID = CIV_PLAINTIFF.RID
LEFT JOIN CIV_DEFENDANT ON CIV_HEAD.ID = CIV_DEFENDANT.RID

All 3 tables have AutoInc ID field defined as primary key.

When i am trying to delete a record, it raises exception

Row cannot be located for updating. Some values may have been changed
since it was last read.

What am i missing? I expect Delete to remove the record from CIV_HEAD
table...

Thanx,
Eugene.



.