SqlCommand.NotificationAutoEnlist 属性

定义

获取或设置一个值,该值指示应用程序是否应从公共 SqlDependency 对象自动接收查询通知。

public:
 property bool NotificationAutoEnlist { bool get(); void set(bool value); };
public bool NotificationAutoEnlist { get; set; }
member this.NotificationAutoEnlist : bool with get, set
Public Property NotificationAutoEnlist As Boolean

属性值

true 如果应用程序应自动接收查询通知,则为否则 false。 默认值为 true

注解

此功能在 ASP.NET 应用程序中用于接收针对 SQL Server 在 ASP 页中执行的所有命令的通知。 这使 ASP.NET 可以缓存页面,直到用于呈现页面的查询将产生不同的结果。 自动登记。

此属性仅适用于支持查询通知的SQL Server版本。 对于早期版本,将此属性设置为 true 对应用程序没有影响。

适用于

另请参阅