Subject Re: [firebird-support] Are these triggers still working in FB 2.0?
Author Alexandre Benson Smith
dr_bentonquest wrote:
> Hi there,
>
>
>
> I upgraded a DB from FB 1.5 to 2.0 and wonder if a trigger like this is
> still working:
>
>
>
> CREATE OR ALTER TRIGGER AI_DETALLECAR FOR DETALLECAR
>
> ACTIVE AFTER INSERT
>
> AS
>
> BEGIN
>
> update FACTURAS
>
> set STATUS = 20
>
> where NUMERO=DETALLECAR.FACTURA;
>
> END
>

I would never imagined it had worked in the past :-/

You should use the NEW.* or OLD.* to reference the values of the changed
records.

see you !

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