| Subject | Trigger to Autoincrement Doesn't Fire | 
|---|---|
| Author | Craig Cox | 
| Post date | 2013-01-14T23:24:10Z | 
I have a FB2.5 table with a generator and trigger to increment a PK.  In IBExpert, the table increments correctly when I add a record.  However, when I try to do it using code in Delphi XE with IBObjects (TIBOTable).  I get an error that says the primary key field must have a value.
This is the code I use:
tableGIS_Config.Open;
tableGIS_Config.Insert;
tableGIS_ConfigUSER.Value := User;
tableGIS_Config.Post;
            This is the code I use:
tableGIS_Config.Open;
tableGIS_Config.Insert;
tableGIS_ConfigUSER.Value := User;
tableGIS_Config.Post;