SqlConnectionStringBuilder.UserInstance Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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.

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

Public Property UserInstance As Boolean

Property Value

Type: System.Boolean

The value of the UserInstance property, or False if none has been supplied.

Exception Condition

To set the value to null, use Value.

This property corresponds to the "User Instance" key within the connection string.


This feature is available only with the SQL Server Express Edition. For more information on user instances, see SQL Server Express User Instances and "User Instances for Non-Administrators" in SQL Server Books Online.

.NET Framework
Available since 2.0
Return to top