Subject | Re: [IBO] Tables with PK AutoGen |
---|---|
Author | Svein Erling Tysvær |
Post date | 2004-12-07T12:49:50Z |
--- In IBObjects@yahoogroups.com, "Daniel Jimenez" wrote:
do the GeneratorLinks->Add on a prepared or open dataset.
HTH,
Set
> Prior to the email post I tried:POSITION 0 AS
>
> AnsiString AGenerator = "AC_ID=GEN_AC_NEW_ID";
> qryAlarms->GeneratorLinks->Add(AGenerator);
>
> And the table has the following trigger defined:
>
> SET TERM ^^ ;
> CREATE TRIGGER T_AC_NEW_ID FOR ALARMCODES ACTIVE BEFORE INSERT
> BEGINThis seems just fine, danieL. Though I do not know what happens if you
> IF( (new.AC_ID IS NULL) OR (new.AC_ID < 1) )THEN
> new.AC_ID = Gen_ID(GEN_AC_NEW_ID, 1);
> END
> ^^
> SET TERM ; ^^
do the GeneratorLinks->Add on a prepared or open dataset.
HTH,
Set