Subject RE: [IBO] Bug - TIBOQuery opens again when manually committed
Author Paul Hope
Hi Helen

This problem only arose because the part of the app with the real version of
this was blindly converted from the BDE to TIBObits.

> >
> >I undertsand that - but the only call to gen_id( ,1) should
> be at Open.
>
> Wrong. You placed a selectable SP in a bi-directional
> dataset. The Open method invokes the SP and begins fetching
> data from its output buffer. The IBOQuery opens its dataset
> by default - as you are apparently already aware, because you
> begin by calling its Close method (with no test to determine
> whether or not it is active, by the way....)

It was set inactive in the designer so it didn't open by default. I was
only calling its close method because it may not have been the first time
round.

>snip..
>
> You get what you ask for. You can actually influence the
> default behaviour of the IBOQuery at session level and stop
> it from opening datasets automatically. (IB_Query doesn't
> have this behaviour....sensibly). So the answer here is
> that, if you don't like the TDataset query's behaviour,
> either modify it explicitly or use the native IBO data access.
>

I agree I got what I ask for - what I didn't realise was that I was asking
for a commit action of caInvalidateCursor which caused a refetch ;-)

All the best
Paul