Subject Re: [IB-Architect] Long query
Author Jason Chapman (JAC2)
> AFAIK isc_dsql_execute2() won't return until the query
> execution is complete and the first row of the result set
> is ready for fetch. So, we have to call something like
> isc_break_execute() from a different thread.
> What is more "right" - make programmers to use multi-
> thread architecture or add "asynchronous calls" to API?
> (When an isc_dsql_execute_nowait() returns immediatelly and
> calls a callback function after the result is ready. In
> this case an isc_wait() may be good too. Oracle uses this
> method.)
I agree. In 6.5 you have to call it from another thread.

I would prefer an option for synchronous or asynchronous - is sync, then I
would like a callback that in delphi would look like

procedure executeProgress( const ServerCPUTimeOnYourQuery : TDateTime; var
abort : boolean);

Then you could show something to the user and on repeated execution give an
indication of progress e.g. progress := ServerCPUTimeOnYourQuery /
averageCPUfromPreviousExecutions

Anyway to execute async / callback gds32.dll is going to have to be
threadsafe internally inside the context of a connection.

JAC