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 不會影響應用程式。

適用於

另請參閱