Subject Re: [IBDI] Triggers problem on interbase 6.0
Author Jacco Hotel Concepts
> Hello,
>
> Why that triggers doesn't work ?
> I would like to set the today Date in column ac_Datemodif after an update.
>
> CREATE TRIGGER ACTIONS_UPDATE FOR ACTIONS
> ACTIVE AFTER UPDATE POSITION 0
> as
> BEGIN
> UPDATE CONTACTFICHE
> SET C_DATEMODIF="NOW"
> WHERE old.ac_codecontact=c_code;
> new.ac_DATEMODIF="NOW";
> END
>
> The instruction, work :
> UPDATE CONTACTFICHE
> SET C_DATEMODIF="NOW"
> WHERE old.ac_codecontact=c_code;
>
> But not :
> new.ac_DATEMODIF="NOW";
>
> AC_datemodif value is always equal to NULL after update !
>
>
>
> Fabrice Vende
> fabrice@...
>
> -
> SARL I N F O C O B
> Developpement, formation, matériel, logiciel
> http://www.infocob.com
>
>
>

Your trigger needs to have BEFORE UPDATE in stead of AFTER UPDATE.

Hotel Concepts R&D
Jacco Kulman
Jacco@...

WWW.HotelConcepts.COM
Veerdijk 40d
1531 MS WORMER
The Netherlands
tel: +31-75-621 15 51
fax: +31-75-628 93 64