TMSChangeNotification Class

A component for keeping information in local dataset up-to-date through receiving notifications.

For a list of all members of this type, see TMSChangeNotification members.




TMSChangeNotification = class(TComponent);


The TMSChangeNotification component is used to register queries with the database and receive notifications in response to DML or DDL changes on the objects associated with queries. The notifications are published by database when the DML or DDL transaction commits.

You should assign a TMSChangeNotification object to the TCustomMSDataSet.ChangeNotification property of the dataset you want to be notified about changes. One TMSChangeNotification object can be associated with multiple datasets.

Client is notified only about changes made in the actually selected data. For example, if you select records that match a condition from a table, notification about the changes in records that do not match provided condition will not be received.

A notification subscription is removed after the notification event occurs. You can reopen/refresh your dataset to get the newest data and renew the notification subscription.

The Query Notification does not support the DBPROP_UNIQUEROWS option that is required for editable datasets. Therefore TMSChangeNotification executes an additional query immediately after the main query has been executed, and before records have been fetched. As the main connection is busy, OLE DB creates an additional connection to the server to execute this query. This can slow down your application. Setting the TMSConnectionOptions.MultipleActiveResultSets option of TMSConnection to True helps to prevent creating additional connections to server.


  1. The Query Notifications mechanism was implemented in SQL Server 2005, therefore this component can be used starting with SQL Server 2005 and SQL Native Client.
  2. Provided statement should meet restrictions described in MSDN .

See Also

© 1997-2022 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback