Skip navigation links

MySQL Forums :: Triggers :: delete trigger error.


Advanced Search

delete trigger error.
Posted by: Rob Thompson ()
Date: August 21, 2008 03:40AM

I have a very strange error on a simple trigger.

here is the trigger:

create trigger trDeletePoItem
before delete on tblPoItem for each row
begin
INSERT INTO PurchaseOrder.tblPoAudit
SET
intPoId = OLD.intPoId,
intProductMasterId = OLD.intProductMasterId,
intUserId = @intUserId,
intActionTypeId = FnGetPoActionId('PoItemDeleted');
end$$

The trigger compiles but I get the following error when trying to use it.
mysql> set @intUserId =1;
Query OK, 0 rows affected (0.00 sec)
mysql> truncate tblPoItem;
ERROR 1146 (42S02): Table 'PurchaseOrder.tblPoAudit' doesn't exist

Howerver:
mysql> describe PurchaseOrder.tblPoAudit;

Shows me that the table does exist.I have both insert and update triggers on that table which insert into the same audit table. I have also tried changing the 'before' to 'after'

thanks for any help

Options: ReplyQuote


Subject Views Written By Posted
delete trigger error. 5358 Rob Thompson 08/21/2008 03:40AM
Re: delete trigger error. 1868 William Chiquito 08/21/2008 01:57PM
Re: delete trigger error. 1960 Praneeth Kasam 08/26/2008 07:31AM
Re: delete trigger error. 1761 Rob Thompson 08/29/2008 01:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.