Board index » delphi » Row cannot be located for updating whenever there is a trigger for update on the table

Row cannot be located for updating whenever there is a trigger for update on the table

Whenever there is a trigger for update on a table I cannot do edit and posts
using a Tadodataset

I have primary key and the update mode is for keyonly:

d.properties['Update Criteria'].value := adCriteriaKey;

The trigger is simple and it affects other tables not the one that is
updated.

The database is SQL SERVER 2000

the trigger is a simple update statement:
------------ trigger -----------
update d2 set amount = inserted.amount
from d2, inserted
where inserted.key = d2.key
-------------------------------

what can I do to avoid it?

Best regards

 

Re:Row cannot be located for updating whenever there is a trigger for update on the table


I found it again !!

Add SET NOCOUNT ON to the beginning of the trigger.ADO is getting confused
about the number of rows updated.

Quote
"John Vr" <iv...@tee.gr> wrote in message news:3cedf2dc_2@dnews...
> Whenever there is a trigger for update on a table I cannot do edit and
posts
> using a Tadodataset

> I have primary key and the update mode is for keyonly:

> d.properties['Update Criteria'].value := adCriteriaKey;

> The trigger is simple and it affects other tables not the one that is
> updated.

> The database is SQL SERVER 2000

> the trigger is a simple update statement:
> ------------ trigger -----------
> update d2 set amount = inserted.amount
> from d2, inserted
> where inserted.key = d2.key
> -------------------------------

> what can I do to avoid it?

> Best regards

Other Threads