ConnectionHelpers.ToScopedServerConnection 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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