OnCallback Event

Applies to
TIB_Dataset

Declaration
TIB_CallbackEvent = Procedure(IB_Dataset: TIB_Dataset; Status: TIB_CallbackStatus; CursorRowNum: longint; var Abort: boolean ) of object;

Description
This event serves as a hook to enable customized behavior while a query is running. By setting the CallbackInc property to 0 or more you will get a callback for each increment indicated. This gives Windows the opportunity to process application messages such a mouse clicks, key presses, etc.

Caution must be taken when performing certain operations that may result in a problem. For example, closing a form that has a running query on it could be problematic.

One thing that could be done here is to place a button available for a user and then when they click on it call the AbortFetching method which will cause the execution of fetches from the query to cease.

This event would also work great to maintain a progress meter on a running query. See the IBF_DataPump form for one such case.