Subject Non null column, before insert trigger not filling column, Delphi
Author Mike
Hi,

I have an 'ID' INTEGER column without a non-null constraint. The table has a BEFORE INSERT trigger that executes the generator that fills the column. When I post a new record the trigger fires and creates the ID column value correctly.

However, if the 'ID' column has a non-null constraint when I post I get an error: 'Column ID must have a value'.

I would have expected the trigger to have filled the column but apparently the constraint checking takes precedence.

Is this foreseen, that is, is this normal or is this a bug?

Obviously, I could simply take off the non-null constraint but I am converting to Firebird with rougly 50 tables, each with a ID column of this type, so I would have to edit 50 table definitions.

Can anyone clarify theis situation?

Regards,

Mike Watson
Datos Informatica.