Callback Locations
Callbacks are provided at both the database level and the connection level. The following callbacks are provided at the database level:
connParams()— This callback is invoked just before establishing a connection with the database and provides database connection information.
preEnvAllocate() — This callback is invoked just before the allocation of a database-specific environment/context handle.
postEnvAllocate() — This callback is invoked after the allocation of the database-specific environment/context handle. The callback is invoked after all the SourcePro DB default properties have been set on the allocated environment/context handle.
preEnvDestroy() — This callback is invoked just before the deallocation of the database-specific environment/context handle but after all the SourcePro DB configuration is complete. As this callback is typically called from the destructor of the
RWDBDatabase object, any exception thrown from this method will be consumed.
The following callbacks are provided at the connection level:
preConnAllocate() — This callback is invoked just before the allocation of the database-specific connection handle but after all the SourcePro DB configuration is complete.
postConnAllocate() — This callback is invoked just after the allocation of the database-specific connection handle but before the SourcePro DB properties have been set.
preConnect() — This callback is invoked just before establishing the database connection but after all the SourcePro DB configuration is complete.
postConnect() — This callback is invoked after all the SourcePro DB default properties have been set and the database connection is established.
preDisconnect() — This callback is invoked just before the database connection is closed but after all the SourcePro DB configuration is complete. As this callback is typically called from the destructor of the
RWDBConnection object, any exception thrown from this method will be consumed.
preConnDestroy() — This callback is invoked just before the deallocation of the connection handle but after all the SourcePro DB configuration is complete. As this callback is typically called from the destructor of the
RWDBConnection object, any exception thrown from this method will be consumed.
NOTE: For the precise location of the callbacks and any applicable restrictions, please refer to the User’s Guide of the particular Access Module you are using.
Note that the connParams callback is not included here; its timing is not fixed relative to other callbacks.