Subject Re: [IBO] Bug - TIBOQuery opens again when manually committed
Author Woody
From: "Paul Hope" <paulhope@...>
> the query is connected to a TIB_connection and a TIB_Transaction (no
> autocommit). I also have a TIB_Query (q) with default transaction just
> for
> reading the generator value and a TMemo for displaying these.
>
> I run the code
>
> procedure TForm1.Button1Click(Sender: TObject);
> begin
> memo1.lines.add('before '+intToStr(q.Gen_ID('inv_no',0)));
> ib_transaction1.StartTransaction;
> iboquery1.Close;
> iboquery1.Open;
> memo1.lines.add('after open '+intToStr(q.Gen_ID('inv_no',0)));
> ib_transaction1.Commit;
> memo1.lines.add('after commit '+intToStr(q.Gen_ID('inv_no',0)));
> end;

Just a guess, but you are accessing the query field after it's been closed.
Internally, the TIB_Query may be reopening for some reason because of this.
What is the state of the query component after the last time you access it
after you do the commit? Is it showing closed or open?

Woody (TMW)