Subject | Re: [IBO] IB_Query - wrong ID assigned |
---|---|
Author | Helen Borrie |
Post date | 2005-05-23T12:16:50Z |
At 11:50 AM 23/05/2005 +0000, you wrote:
IBO will fetch a new value from the generator each time Insert is called
and/or each time an Insert statement is executed. Check your code and your
timings to make sure you are not accidentally performing two inserts when
you only want one.
Also make sure that, if you changed the trigger to make it test for null,
that you closed all connections to the database afterwards. When a trigger
or SP is executed, its code is cached. Any metadata updates are deferred
until the cache is cleared, i.e. when all users, including SYSDBA, are
logged out.
Note the correct syntax for GeneratorLinks (is:
GeneratorLinks.Add('ID_VYKON=GEN_CISVYKONY');
Don't place blanks at each side of the "=" symbol in ANY of IBO's
stringlist properties.
Helen
> >A bug somewhere in your application. :-))
> > as
> > begin
> > If (new.ID_VYKON is null) then
> > new.ID_VYKON = GEN_ID(GEN_CISVYKONY, 1);
> > end
> >
> > Helen
>
>Helen,
>thank for your reply, but it is not solving that problem. I had this
>trigger excatly as you wrote. It is maybe a bug.
IBO will fetch a new value from the generator each time Insert is called
and/or each time an Insert statement is executed. Check your code and your
timings to make sure you are not accidentally performing two inserts when
you only want one.
Also make sure that, if you changed the trigger to make it test for null,
that you closed all connections to the database afterwards. When a trigger
or SP is executed, its code is cached. Any metadata updates are deferred
until the cache is cleared, i.e. when all users, including SYSDBA, are
logged out.
Note the correct syntax for GeneratorLinks (is:
GeneratorLinks.Add('ID_VYKON=GEN_CISVYKONY');
Don't place blanks at each side of the "=" symbol in ANY of IBO's
stringlist properties.
Helen