SqlConnectionStringBuilder.ContextConnection Property

Definition

获取或设置一个值,该值指示应建立与 SQL Server 的客户端/服务器连接还是进程内连接。Gets or sets a value that indicates whether a client/server or in-process connection to SQL Server should be made.

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

Property Value

Boolean

ContextConnection 属性的值,或者,如果未提供任何值,则为 FalseThe value of the ContextConnection property, or False if none has been supplied.

Remarks

此属性与连接字符串内的“Context Connection”键相对应。This property corresponds to the "Context Connection" key within the connection string.

Note

如果 SqlConnection 的连接字符串为 "context connection = true",则 DataSource 属性返回 nullThe DataSource property returns null if the connection string for the SqlConnection is "context connection=true".

Applies to

See also