Subject Re: [firebird-support] "NEW." "OLD." outside of a trigger
Author Martijn Tonies

> I want to log every transaction on some tables, with one single procedure.
> The procedure will be called like this:
> execute procedure naploz(<TABLENAME varchar(20)>,<TRANS.TYPE char(1) -
> 'I' for insert, 'u' for update, 'd' for delete>)
> How can I retrieve the OLD.<FIELDNAME> and NEW.<FIELDNAME> values?

You cannot. These are ONLY valid in a trigger.

Instead of re-inventing the wheel on logging database changes, why
not take a look at our database logging tool IB LogManager?

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Upscene Productions
Database development questions? Check the forum!