ConnectionHelpers.ToScopedServerConnection 方法

定義

多載

名稱 Description
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

傳回

適用於