System.Data.SqlClient.SqlDependency.OnChange Event

Occurs when a notification is received for any of the commands associated with this System.Data.SqlClient.SqlDependency object.

Syntax

public event OnChangeEventHandler OnChange

Remarks

SqlDependency.OnChange occurs when the results for the associated command change. If you are not using SqlDependency.OnChange, you can check the SqlDependency.HasChanges property to determine whether the query results have changed.

The SqlDependency.OnChange event does not necessarily imply a change in the data. Other circumstances, such as time-out expired and failure to set the notification request, also generate SqlDependency.OnChange.

Requirements

Namespace: System.Data.SqlClient
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 2.0.0.0