Subject Autoincrement field with TIBODATABASE Object
Author pmurad2000
I setup an autoincrement field using the IBWorkbench Wizard for a
program that accesses the data using Interbase Objects TIBODatabase
object- the one that is InfoPower compatible.
In delphi I set the required-flag of the concerning field to false.
When I run the program and hit insert, and then add data to the
fields, except the ID field, and then use save, I get the following
error " exception class edatabase error with message 'field'
PatientID must have value"

What am I doing wrong?
>
> My IBworkbench has the following code in the trigger section
> begin
> /* first - check for NULL for this column */
> if (new.PATINFO_ID is null)
> then begin
> /* if NULL, provide a new ID for this generator */
> new.PATINFO_ID = gen_id(PATINFO_GEN, 1);
> end
> end
>
> And the following code in the generator
>
> CREATE GENERATOR PATINFO_GEN;
> SET GENERATOR PATINFO_GEN TO 0;
>