SqlNotificationType 枚举

定义

描述 OnChangeEventHandler 事件处理程序可通过 SqlNotificationEventArgs 参数接收的不同通知类型。Describes the different notification types that can be received by an OnChangeEventHandler event handler through the SqlNotificationEventArgs parameter.

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

字段

Change 0

被监视的服务器中的数据已更改。Data on the server being monitored changed. 使用 SqlNotificationInfo 项确定更改的详细信息。Use the SqlNotificationInfo item to determine the details of the change.

Subscribe 1

创建通知订阅时发生错误。There was a failure to create a notification subscription. 使用 SqlNotificationEventArgs 对象的 SqlNotificationInfo 项来确定发生错误的原因。Use the SqlNotificationEventArgs object's SqlNotificationInfo item to determine the cause of the failure.

Unknown -1

当客户端未识别由服务器发送的类型选项时使用。Used when the type option sent by the server was not recognized by the client.

注解

枚举由SqlNotificationEventArgs类的实例引用。 SqlNotificationTypeThe SqlNotificationType enumeration is referenced by an instance of the SqlNotificationEventArgs class. 当向SqlDependency类激发通知事件时, 将提供此信息。This information is provided when a notification event is fired with the SqlDependency class.

适用于

另请参阅