Hi there
Just working on a tool that will capture some events in the DB(sql server 2000) of one of our supplier to launch some process (restore of files, for ex.) in one of our internally developped tool...
The case is this one : i've a trigger for insert on a table, a trigger for update and one for delete.
Sometimes, the 'off the shelf' application does stranges things as, in only one transaction, inserting a row and immedialtely deleting it...
My problem : as triggers are working at transaction level (am i right ?), the effect is that only the insert trigger fires. I can't capture the delete instruction...(((
I've tried to do something like this in the insert trigger
set @IDInsert=@@identity from inserted
set @IDdelete=@@identity from deleted
but @IDdelete is null...
Any idea ?
TIA
Just working on a tool that will capture some events in the DB(sql server 2000) of one of our supplier to launch some process (restore of files, for ex.) in one of our internally developped tool...
The case is this one : i've a trigger for insert on a table, a trigger for update and one for delete.
Sometimes, the 'off the shelf' application does stranges things as, in only one transaction, inserting a row and immedialtely deleting it...
My problem : as triggers are working at transaction level (am i right ?), the effect is that only the insert trigger fires. I can't capture the delete instruction...(((
I've tried to do something like this in the insert trigger
set @IDInsert=@@identity from inserted
set @IDdelete=@@identity from deleted
but @IDdelete is null...
Any idea ?
TIA