SqlChangeMonitor(SqlDependency) SqlChangeMonitor(SqlDependency) SqlChangeMonitor(SqlDependency) SqlChangeMonitor(SqlDependency) Constructor


Initializes a new instance of the SqlChangeMonitor class.

 SqlChangeMonitor(System::Data::SqlClient::SqlDependency ^ dependency);
public SqlChangeMonitor (System.Data.SqlClient.SqlDependency dependency);
new System.Runtime.Caching.SqlChangeMonitor : System.Data.SqlClient.SqlDependency -> System.Runtime.Caching.SqlChangeMonitor
Public Sub New (dependency As SqlDependency)


SqlDependency SqlDependency SqlDependency SqlDependency

An object that represents an ADO.NET SqlDependency object.



The SqlChangeMonitor method binds the OnChange event of the object in dependency to the OnChanged method handler. This enables the change monitor to receive notification of changes in SQL Server databases.

When you invoke the SqlChangeMonitor constructor, you must pass a SqlDependency object as a parameter. When you create a SqlDependency object, you must pass a SqlCommand parameter to the constructor. The constructor for SqlDependency class lets you specify optional information for configuring the SqlDependency instance.

Applies to