Subject RE: [IBO] SQL-cursor (icon)
Author Jason Wharton

> I use one IB_Connection, that is connected to a IB_Session-component.
> All queries and datasets are set to this IB_Connection at
> creation (in inherited FormCreate).
> My code is as follows:
> Try
> frm_basecomp.IBDB.BeginBusy(False);
> If Not LoadMyPreferences
> Then
> Begin
> frm_basecomp.IBDB.EndBusy;
> Exit;
> End;
> Finally
> frm_basecomp.IBDB.EndBusy;
> End;

This doesn't look right.

I think it should look like this:


You are running the risk of calling EndBusy twice and you shouldn't do that.
Calling these methods should be carefully handled as they increment and
decrement counters internally.

> where IBDB is the IB_Connection (residing on a general form
> frm_basecomp).
> I debugged the application, LoadMyPreferences happens inside
> BeginBusy and EndBusy, still flickers however.

That is really strange. There should be no flickering in this case.

> I suspect setting the connection of queries and datasets at
> runtime is ok ?

Yes, that is fine.

Please try putting a TIB_Session component on your main data form and make
sure it is created first in the creation order and see if you can make that
module (or form) created first in your project and see if that takes care of
the problem.

Jason Wharton