Subject Re: [firebird-support] multiple inserts in trigger
Author Alexandre Benson Smith
Ross Ryding wrote:
> I am trying to do multiple inserts to the same table in a trigger.
> The purpose of the script is to provide an audit of a table. The
> trigger is AFTER UPDATE on my JOBS table. The inserts are going to
> DO_AUDIT which is a table to just monitor changes to tables. If i
> then run the application and modify any one field it funtions fine,
> if I modify 2 or more fields it hangs.
>
> Basically it tests each field for old <> new and if that is true it
> does an insert into the table with information necessary to audit.
>
> If two of the tests or more are true, it hangs from the aplllication
> point of view. I am sure it is something to do with locking or
> multiple insert context but I can find nothing in the firebird
> manual, in fact they imply there is no issue.
>
> thanks ross
>
>

Ross,

Not the answer to your question, but I think you should provide logic to
handle null's on your trigger.

Had you checked if you are getting some kind of infinite recursion with
this trigger ?

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br