SqlConnectionStringBuilder.UserInstance Property

Definition

获取或设置一个值,该值指示是否将连接从默认的 SQL Server Express 实例重定向到在调用方帐户之下运行并且在运行时启动的实例。Gets or sets a value that indicates whether to redirect the connection from the default SQL Server Express instance to a runtime-initiated instance running under the account of the caller.

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

Property Value

Boolean

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

Exceptions

若要将值设置为 null,请使用 ValueTo set the value to null, use Value.

Remarks

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

Note

此功能仅在 SQL Server Express 版本中可用。This feature is available only with the SQL Server Express Edition. 有关用户实例的详细信息,请参阅SQL Server Express 用户实例For more information on user instances, see SQL Server Express User Instances.

Applies to

See also