M
MB
Hello!
I am using a trigger to set ChangedDate and Changed by:
CREATE trigger [tri_tblCustomers_update] on [tblCustomers] for update as
declare @ID int
select @ID=(select [TreeID] from inserted)
update [tblCustomers] set ChangedDate=GetDate(), ChangedBy=suser_sname()
where [TreeID]=@ID
The problem is that when I change a value (a column called CustomerName) in
a datagrid or other data component having ds.tables("tblCustomers") as
datasource and then pressing my save button, it works fine the first and
second time, but then (the third time I think) when changing a value and
clicking my save button, I got the error message "Additional information:
Concurrency violation: the UpdateCommand affected 0 records."
I am using simple da.fill and da.update commands.
Is something wrong with my trigger or do I need some additional code?
Regards Magnus
I am using a trigger to set ChangedDate and Changed by:
CREATE trigger [tri_tblCustomers_update] on [tblCustomers] for update as
declare @ID int
select @ID=(select [TreeID] from inserted)
update [tblCustomers] set ChangedDate=GetDate(), ChangedBy=suser_sname()
where [TreeID]=@ID
The problem is that when I change a value (a column called CustomerName) in
a datagrid or other data component having ds.tables("tblCustomers") as
datasource and then pressing my save button, it works fine the first and
second time, but then (the third time I think) when changing a value and
clicking my save button, I got the error message "Additional information:
Concurrency violation: the UpdateCommand affected 0 records."
I am using simple da.fill and da.update commands.
Is something wrong with my trigger or do I need some additional code?
Regards Magnus