语言

SqlConnectionStringBuilder.UserInstance 属性

定义

获取或设置一个值,该值指示是否将连接从默认的 SQL Server Express 实例重定向到在调用方帐户之下运行并且在运行时启动的实例。

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

属性值

为 UserInstance 属性的值,或者,如果未提供任何值,则为 False。

例外

若要将值设置为 null,请使用 Value。

注解

此属性与连接字符串内的“User Instance”键相对应。

注意

此功能仅适用于 SQL Server Express 版。 有关用户实例的详细信息,请参阅 SQL Server Express 用户实例。

适用于