Share via


SqlConnectionStringBuilder.ContextConnection 屬性

定義

警告

ContextConnection has been deprecated. SqlConnection will ignore the 'Context Connection' keyword.

已過時。 取得或設定值,指出是否應該與 SQL Server 進行用戶端/伺服器或同處理序 (In-Process) 連接。

public:
 property bool ContextConnection { bool get(); void set(bool value); };
public bool ContextConnection { get; set; }
[System.Obsolete("ContextConnection has been deprecated. SqlConnection will ignore the 'Context Connection' keyword.")]
public bool ContextConnection { get; set; }
member this.ContextConnection : bool with get, set
[<System.Obsolete("ContextConnection has been deprecated. SqlConnection will ignore the 'Context Connection' keyword.")>]
member this.ContextConnection : bool with get, set
Public Property ContextConnection As Boolean

屬性值

ContextConnection 屬性的值,如未提供任何值,則為 False

屬性

備註

此屬性會對應至連接字串內的 "Context Connection" 索引鍵。

注意

如果 的連接字串為 SqlConnection 「coNtext connection=true」,則 DataSource 屬性會 null 傳回 。

適用於