Subject RE: [IBO] Help with generators
Author Kaputnik
The trigger is BEFORE INSERT, is set to active and assigns the
generator-value to new.ID=GEN_ID(something)?

The Problem with many of the interbase tools is, that they will fire the
error themselves, not the database-engine, as e.g. IBObjects will check
itself, if a field is a required field, and post the error before
inserting the record at all.

Try a manual insert into tablename (NAME) VALUES ('SOMETHING') and see,
what happens....

Cu, Nick


> -----Original Message-----
> From: conner763f@... [mailto:conner763f@...]
> Sent: Thursday, July 12, 2001 7:50 PM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] Help with generators
>
> Hello, I'm a new user of Interbase, and I have this problem:
> I created a database with a primary key (ID) and a field (name),
> created the generator and the trigger (I used as a model
> employee.gdb).
> Now, when I access the database with a frontend like IBAccess or
> IB_WISQL, and try to add a record, insert something into Name, and
> then post it, I receive "ID is a required field". The same happens
> using employee.gdb and bugtrack.gdb, an example I found on BCB5 Dev
> Guide.
> The trigger should fire before the insert and insert the new value
> right?
> I tried to code a simple CBuilder program, setting the field ID
> property "required" to false (I use IBObjects), but I got the same
> error message, it seems that I'm not able to fire the trigger.
>
> Any help?
>