SqlNotificationType 列舉

定義

描述 OnChangeEventHandler 事件處理常式可以透過 SqlNotificationEventArgs 參數接收的不同告知類型。

public enum class SqlNotificationType
public enum SqlNotificationType
type SqlNotificationType = 
Public Enum SqlNotificationType
繼承
SqlNotificationType

欄位

Change 0

受監視之伺服器上的資料已變更。 使用 SqlNotificationInfo 項目,判斷變更的明細。

Subscribe 1

建立告知訂閱失敗。 使用 SqlNotificationEventArgs 物件的 SqlNotificationInfo 項目,判斷失敗原因。

Unknown -1

當用戶端無法辨識伺服器所傳送的類型選項時使用。

備註

列舉 SqlNotificationType 是由 類別的 SqlNotificationEventArgs 實例所參考。 使用 類別引發 SqlDependency 通知事件時,會提供這項資訊。

適用於

另請參閱