Share via


ConnectionHelpers.ToScopedServerConnection Method

Definition

Overloads

ToScopedServerConnection(SqlConnection, Urn)

Given a SqlConnection and Urn, returns the ServerConnection scoped to the database specified by the Urn.
If the Urn does not require a database scope, the ServerConnection will be scoped to whichever database the input SqlConnection is using.

ToScopedServerConnection(SqlConnection, Urn)

ToScopedServerConnection(SqlConnection, Urn)

Given a SqlConnection and Urn, returns the ServerConnection scoped to the database specified by the Urn.
If the Urn does not require a database scope, the ServerConnection will be scoped to whichever database the input SqlConnection is using.

public static Microsoft.SqlServer.Management.Common.ServerConnection ToScopedServerConnection (this Microsoft.Data.SqlClient.SqlConnection sqlConnection, Microsoft.SqlServer.Management.Sdk.Sfc.Urn urn);
static member ToScopedServerConnection : Microsoft.Data.SqlClient.SqlConnection * Microsoft.SqlServer.Management.Sdk.Sfc.Urn -> Microsoft.SqlServer.Management.Common.ServerConnection
<Extension()>
Public Function ToScopedServerConnection (sqlConnection As SqlConnection, urn As Urn) As ServerConnection

Parameters

sqlConnection
SqlConnection
urn
Urn

Returns

Applies to

ToScopedServerConnection(SqlConnection, Urn)

public static Microsoft.SqlServer.Management.Common.ServerConnection ToScopedServerConnection (this System.Data.SqlClient.SqlConnection sqlConnection, Microsoft.SqlServer.Management.Sdk.Sfc.Urn urn);
static member ToScopedServerConnection : System.Data.SqlClient.SqlConnection * Microsoft.SqlServer.Management.Sdk.Sfc.Urn -> Microsoft.SqlServer.Management.Common.ServerConnection
<Extension()>
Public Function ToScopedServerConnection (sqlConnection As SqlConnection, urn As Urn) As ServerConnection

Parameters

sqlConnection
SqlConnection
urn
Urn

Returns

Applies to