Subject Re: [firebird-support] I can't use new.FIELD in a EXECUTE STATEMENT called into a Trigger
Author Alexandre Benson Smith
marc_guillot wrote:
> Hello.
>
> In a very simple sample, into a Trigger I can use :
>
> select new.ROW_ID from rdb$database into :ROW_ID
>
> But using EXECUTE STATEMENT this doesn't works :
>
> SQL = 'select new.ROW_ID from rdb$database';
> execute statement :SQL into :ROW_ID;
>
> ¿ There is any way to access to new. and old. trigger fields into an EXECUTE STATEMENT call ?
>
> I'm writing some logging triggers that will look at all the fields of the table (using the system tables) and logging new values of which have changed.
>
> Thank you.
>

new.* or old.* are not visible inside EXECUTE STATEMENT context.

You can write an application that scans the System Tables and generate
the trigger code for you.

see you !

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