database trrigger and AdoDataset

From: treok (h.k.j.keesmaat_at_chello.nl)
Date: 10/26/04


Date: Tue, 26 Oct 2004 16:03:35 +0200

On the database (SQLSERVER2000) there is a trigger on the article table
(key: clientid,articlecode) where an update is logged into the table
article_mut:

create tr_article_upd
on dbo.article
for update
as
 if update(EANArtCode)
  insert into article_mut
(clientid,articlecode,type_mut,column_mut,date_mut)
  select ins.clientid,ins.articlecode,'U','EANArtCode'
,cast(datename(dd,getdate())+' '+datename(mm,getdate()+' '+datename
(yyyy,getdate()) as datetime)
  from inserted ins inner join deleted del
  on ins.clientid = del.clientid
  and ins. articlecode = del. articlecode
  where ins.EANArtCode <> del.EANArtCode

When updating the field EANArtCode in Delphi I get an error
message :’Row can not located for update’.
That puzzled me because the trigger does not affect the article table.

Strange is that the update is posted in the database (also when
cancelling the update after the error message).

When the trigger is dropped no error is raised.

How can I avoid the error message without dropping the trigger?

--- posted by geoForum on http://delphi.newswhat.com



Relevant Pages

  • Re: help with database
    ... database via the use of a trigger. ... but then I get an error message after that. ... the error message is telling the truth -- for the first user, ...
    (comp.databases.oracle.misc)
  • Re: help with database
    ... I'm using Oracle as my database, and Dreamweaver to create the input ... database via the use of a trigger. ... but then I get an error message after that. ...
    (comp.databases.oracle.tools)
  • help with database
    ... I'm using Oracle as my database, and Dreamweaver to create the input forms. ... database via the use of a trigger. ... but then I get an error message after that. ...
    (comp.databases.oracle.server)
  • help with database
    ... I'm using Oracle as my database, and Dreamweaver to create the input forms. ... database via the use of a trigger. ... but then I get an error message after that. ...
    (comp.databases.oracle.misc)
  • help with database
    ... I'm using Oracle as my database, and Dreamweaver to create the input forms. ... database via the use of a trigger. ... but then I get an error message after that. ...
    (comp.databases.oracle.tools)