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 應用程式,接收 ASP 頁面中對 SQL Server 執行的所有指令通知。 這使得 ASP.NET 能夠快取頁面,直到用來渲染頁面的查詢產生不同的結果。 自動入伍。

此特性僅適用於支援查詢通知的 SQL Server 版本。 在早期版本中,將此屬性設為 對 true 應用程式沒有影響。

適用於

另請參閱