ConnectionHelpers.ToScopedServerConnection 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| ToScopedServerConnection(SqlConnection, Urn) |
给定 SqlConnection 和 Urn,则返回范围限定为 Urn 指定的数据库的 ServerConnection。 |
| 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