Database Notifications
|
<< Click to Display Table of Contents >> Navigation: Databases > Database Notifications |
Drivers can receive notifications of database changes for initialized databases by subscribing to either the OnDatabaseChange event of the BncsFramework static or the OnDatabaseChange event of a BncsDatabase object.
The event signatures for both are identical but the conditions under which each are called differ. If there are ANY subscribers to the BncsDatabase event then that event is raised, otherwise the BncsFramework event is raised (assuming there are subscribers to that)
Drivers should subscribe to BncsDatabase.OnDatabaseChange to attach a handler to changes to a specific database. BncsFramework.OnDatabaseChange allows a generic handler to be attached for ALL initialized databases EXCEPT those that have a specific handler.
Applications wishing to handle changes with specific slots within a database can use the BncsDatabase.AddSlotCallback method to obtain a BncsDatabaseSlotCallback object. A slot specific handler can then be attached to the OnDatabaseChange event. Callback handlers can be dynamically de-registered using the BncsDatabase.RemoveSlotCallback method.