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

> 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?
www.upscene.com

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com