to complete the thread a found a solution to use the following code in the component "After Insert" event
Code: Select all
IBCQuery1.Close;
IBCQuery1.SQL.Clear;
IBCQuery1.SQL.Add('SELECT NEXT VALUE FOR GEN_table1_deptno from RDB$DATABASE');
IBCQuery1.Open;
IBCQuery1.fieldbyname('deptno').asinteger := IBCQuery1.Fields[0].AsInteger;