Intebase Auto Increment field
Posted on 2001-09-03
I'm using Interbase 5.
My problem is that I want to apply the Auto-Increment field in dbGrid that linked with Interbase in Delphi.
I'm using generator, and I'm tring to use trigger:
create trigger for Test after insert as
Test.ID = Gen_ID(TestGen, 1);
it compiles successfully but it do nothing, also what must I do for NOT NULL in primary key (Auto Inc)
I tried also to make it the default value in fields definition:
create Table Test (ID Integer not null primary key default Gen_ID(TestGen, 1), Name VarChar(30));
Also I'm getting an error on that (unknown function -Gen_ID )
Motaz Abdel Azeem