Subject Re: [IBO] Refresh question
Author Woody (TMW)
> Hi Woody,
>
> You are 100% right, I have just check my trigger definition:
>
>
> SET TERM ^^ ;
> CREATE TRIGGER T_AC_NEW_ID FOR ALARMCODES ACTIVE BEFORE INSERT POSITION 0
AS
> BEGIN
> IF( (new.AC_ID IS NULL) OR (new.AC_ID < 1) )THEN
> new.AC_ID = Gen_ID(GEN_AC_NEW_ID, 1);
> END
> ^^
> SET TERM ; ^^
>
> Thus, I think my problem must be in the application code.

Glad to help. This example, however, raises an intersting question for me. I
could try it to find out but, could this test be restructured as:

IF (COALESCE(new.AC_ID, 0) < 1) then
new.AC_ID = Gen_ID(GEN_AC_NEW_ID, 1);

??

Woody (TMW)