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

注解

此属性对应于连接字符串中的“用户实例”键。

Note

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

适用于

另请参阅