Subject Problem with Trigger on Table during insert.
Author jack_engleman
This code has worked in using the BDE for the last 5 years, but in the
converted I am having a problem with a table checks and using a
TIBOQuery to add a row to this table and the software complains the
'CHECK_KEY must have a value'.

this trigger is created on the CHECKS table.

CREATE TRIGGER SET_CHECK_NUM FOR CHECKS
BEFORE INSERT AS
BEGIN
NEW.CHECK_KEY = GEN_ID(CHECK_KEY_GEN, 1);
END^

In the code below when I try to post I get the Error.

Query_Checks.Close;
Query_Checks.Open;
Query_Checks.Insert;
Query_Checks.FieldByName('ACC_KEY').AsInteger := WWAccKey;
Query_Checks.FieldByName('EMP_KEY').AsInteger := EEmp_Key;
Query_Checks.FieldByName('CHECK_DATE').AsDateTime :=
DTP_CheckDate.Date;
Query_Checks.FieldByName('PAY_DATE').AsDateTime := Date;
Query_Checks.FieldByName('CHECK_NUM').AsString := Edit_check.Text;
Query_Checks.FieldByName('AMT').AsCurrency := Amt;
Query_Checks.Post;
Query_Checks.Close;

Can somebody give some pointers how to get around this problem??

I am using the 4.6 Bc IBO version.

Thanks in Advance

Jack