Subject | Re: [IBO] generator increments by 3 |
---|---|
Author | Helen Borrie |
Post date | 2003-12-31T08:52:31Z |
At 10:04 PM 30/12/2003 -0700, you wrote:
OK, nothing exceptional there, except that your instantiation of the
unnamed field object causes one extra prepare - you get two prepares + one
execution instead of one prepare + one execution, i.e. 3 steps of the
generator, not 2.
To demonstrate WHY a query object is not the right way to do what you want
to do I have taken another tack. If you MUST do this yourself (instead of
using the internal method) then use an ib_cursor. I have uploaded a
drop-dead simple, rough demo so you can see for yourself the "business"
that goes on in a query object.
http://groups.yahoo.com/group/IBObjects/files/generator_demo.zip
You'll need to change the Server and Path properties to your own. Don't
change anything else.
Click the Clear button on the monitor dialog each time before you click the
Click Me button on the main form. You can use the radio group to switch
between your iboquery and an ib_cursor that does the same job *without* all
the prepares and unprepares that are causing your generator to leap forward.
You can switch between the two pieces of transaction code by commenting and
uncommenting, to prove to yourself that it doesn't have anything to do with
the transaction.
Really, I cannot think of any other way to convince you....I wish you guys
would use the monitor.
Helen
>Hi Helen,If you are using a dataset then your code has quite a few prepares!!
> I am using Firebird 1.03, IBO 4.2.Ib. My code has no prepares.
>Here is the text dfm:[snip]
OK, nothing exceptional there, except that your instantiation of the
unnamed field object causes one extra prepare - you get two prepares + one
execution instead of one prepare + one execution, i.e. 3 steps of the
generator, not 2.
To demonstrate WHY a query object is not the right way to do what you want
to do I have taken another tack. If you MUST do this yourself (instead of
using the internal method) then use an ib_cursor. I have uploaded a
drop-dead simple, rough demo so you can see for yourself the "business"
that goes on in a query object.
http://groups.yahoo.com/group/IBObjects/files/generator_demo.zip
You'll need to change the Server and Path properties to your own. Don't
change anything else.
Click the Clear button on the monitor dialog each time before you click the
Click Me button on the main form. You can use the radio group to switch
between your iboquery and an ib_cursor that does the same job *without* all
the prepares and unprepares that are causing your generator to leap forward.
You can switch between the two pieces of transaction code by commenting and
uncommenting, to prove to yourself that it doesn't have anything to do with
the transaction.
Really, I cannot think of any other way to convince you....I wish you guys
would use the monitor.
Helen