Callbacks

<< Click to Display Table of Contents >>

Navigation:  Basic concepts > Database entities >

Callbacks

Previous pageReturn to chapter overviewNext page

Sometimes a client application needs information about the progress of a given function. For example, if a table is being restructured, certain conditions can cause records to be written to a "problems" table rather than the destination table. This situation could warrant termination of the operation, or it could require some other action. A callback enables the application to intercede and evaluate such a situation before any action is taken by BDE. The application registers the callback in advance by calling DbiRegisterCallBack.

After a callback is registered, the occurrence of the specified event triggers the database engine to call the callback function, which in turn alerts the application that the event has occurred. The callback then awaits further instructions from the application.

The client responds to the callback by sending an appropriate return code (cbrABORT, cbrCONTINUE, and so on). The callback mechanism is efficient because BDE can get the application's response without interrupting the normal client process flow.

For detailed information, see Using callbacks

To inspect the callback structures, see Data structures