SqlConnectionStringBuilder.ContextConnection 屬性

定義

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

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

屬性值

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

備註

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

注意

如果 的 SqlConnection 連接字串 為 “context connection=true”,則DataSource屬性會null傳回 。

適用於

另請參閱