Subject | Re: [IBO] generator increments by 3 |
---|---|
Author | Helen Borrie |
Post date | 2003-12-31T04:28:34Z |
At 08:59 PM 30/12/2003 -0700, you wrote:
settings, I guess it is also possible that it's getting prepared twice. It
will get incremented each time it is prepared.
2. Open (set active) increments it again
That's why I suggested that you *don't* use this type of query to get the
value. It is a "fake query", since it doesn't act on a table. The
generation has to be timed so that it gets called once and only once, at
the right time. If you use GeneratorLinks, it will take care of that.
number under control. The number will increment regardless of the client
transaction, because that is how generators are designed to work.
Something you can do for yourself is drop a monitor dialog onto your form
and actually watch each query that crosses the API - remembering that
*each* prepare and *each* open will cause the generator to fire.
objects think is the default transaction. If you would report on the
monitor activity, we can work out where the short-circuit is happening.
Helen
>Hi,1. Prepare - increments it by 1. With a possible confusion of transaction
> Thanks for all the tips! They will be used for sure.
> However, I am still at a loss as to how the generator can increment by 3
>with a single call to the IBOQuery.
settings, I guess it is also possible that it's getting prepared twice. It
will get incremented each time it is prepared.
2. Open (set active) increments it again
That's why I suggested that you *don't* use this type of query to get the
value. It is a "fake query", since it doesn't act on a table. The
generation has to be timed so that it gets called once and only once, at
the right time. If you use GeneratorLinks, it will take care of that.
>It should only increment by 1. I haveIt is coincidence, insofar as you don't have the actual generation of the
>tried several different combinations of components and the result is always
>the same. This is not coincidence.
number under control. The number will increment regardless of the client
transaction, because that is how generators are designed to work.
Something you can do for yourself is drop a monitor dialog onto your form
and actually watch each query that crosses the API - remembering that
*each* prepare and *each* open will cause the generator to fire.
>The only time it works is if you use the IBODatabase to control theLet us see the DFM file. I want to see what your connection and dataset
>transaction (and use the default trns) or to not explicitly do a
>transaction.
objects think is the default transaction. If you would report on the
monitor activity, we can work out where the short-circuit is happening.
Helen