Subject Re: [IBO] IBO components and progression bar
Author Geoff Worboys
> I have some lengthy database procedures.
> In order to show the user what is going on I want to show a
> progression bar.
> Is there a progression bar that works with the IBO components ?
> I would like to do as much as possible with the IBO native
> components.

It all depends :-)

If you are retrieving records back to the client and processing them
there, then you can setup your own progress display. It is important
to note that getting the total number of records from the result set
(in order to give a % progress indication) can take almost as long as
executing the query itself - since that is what interbase has to do to
work it out. Usually I end up just giving some form on animation to
let them know it is still working.

If you are running long running stored procedures on the server then
you have a problem.

Interbase does not give any sort of feedback while a procedure is
running. So IBO is stuck with executing the procedure and waiting
(and waiting and waiting :-) for IB to say that it is finished. The
only way you can provide feed back to the user in this situation (and
stop the application from appearing to be locked up) is to run the
procedure from a background thread.

This involves creating a whole separate connection setup on the
background thread, from which to execute your dsql or whatever.
(There is a threading sample with the source.) Once you have this
setup you can give some sort of timer updated display in the
foreground (if you need it) to let the user know something is
happening (we hope).

Geoff Worboys
Telesis Computing