Subject | Re: [IBO] Callback question |
---|---|
Author | Jason Wharton |
Post date | 2004-01-01T04:42:24Z |
> Delphi 7 and IBO 4.2I. I'm trying to make a callback for anCallbacks are not asynchronous. They are merely designed to allow you to
> TIB_StoredProc component, but with no luck. I have set CallbackInc :=
> 5 and assigned a proper callback procedure to the OnCallback event of
> the component (BTW, is there any particular reason why these and other
> related properties are not published?).
>
> The stored procedure itself doesn't contain DDL and is not selectable,
> I call it with ExecProc and it simply scans an entire table from first
> to last record (with a FOR..DO loop) to update other tables.
>
> The problem is that the procedure bound to the OnCallback event is
> never called. The purpose of this procedure is only to update a
> progress bar based on the total number of records in the scanned
> table. For this reason the application seems obviously frozen during
> the two/three minutes that it requires to do the job.
>
> Any hint?
interupt the calls to fetch record streams. You only get a potential hook
for a callback between calls to the API fetch call. Thus, with buffering of
records in packets and different flavors of server query processing, this
can be somewhat an unpredictable event.
If your query is only for a single record returned then callbacks aren't
going to do anything for you.
I have deliberately put long running processes into select procedures so
that I could keep a progress bar updated. It works fairly well but isn't
ideal and does add to the overhead of the operation, not to mention make
substantially greater use of the network.
HTH,
Jason Wharton