Subject Re: [firebird-support] Trigger - Indirect Access to OLD / NEW context variables
Author Thomas Steinmaurer

> I would like to implement generic code to access OLD and NEW context variables within a trigger.
> So
> A) can I derive the Tablename within a trigger
> B) Can I access the context variables using an array or some other variable
> e.g. I can derive the column names if I know the table name
> Knowing the column name can I access its value e.g. ColName1.OLD
> Ultimately I want to pass the Tablename and Primary key values from a Trigger to a Stored procedure

You can't. You have to hard-code this things in the trigger, which
means, table name as string somewhere. If you intend to implement some
kind of "generic" logging mechanism, have a look here:

Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
My blog: