语言

ConnectionHelpers.ToScopedServerConnection 方法

定义

重载

名称 说明
ToScopedServerConnection(SqlConnection, Urn)

给定 SqlConnection 和 Urn,则返回范围限定为 Urn 指定的数据库的 ServerConnection。
如果 Urn 不需要数据库范围,则 ServerConnection 的范围将限定为 SqlConnection 输入所使用的数据库。

ToScopedServerConnection(SqlConnection, Urn)

ToScopedServerConnection(SqlConnection, Urn)

给定 SqlConnection 和 Urn,则返回范围限定为 Urn 指定的数据库的 ServerConnection。
如果 Urn 不需要数据库范围,则 ServerConnection 的范围将限定为 SqlConnection 输入所使用的数据库。

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

参数

sqlConnection
SqlConnection
urn
Urn

返回

适用于

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

参数

sqlConnection
SqlConnection
urn
Urn

返回

适用于