SqlAuthenticationProvider.SetProvider 方法

定義

依方法設定認證提供者。

public:
 static bool SetProvider(System::Data::SqlClient::SqlAuthenticationMethod authenticationMethod, System::Data::SqlClient::SqlAuthenticationProvider ^ provider);
public static bool SetProvider(System.Data.SqlClient.SqlAuthenticationMethod authenticationMethod, System.Data.SqlClient.SqlAuthenticationProvider provider);
static member SetProvider : System.Data.SqlClient.SqlAuthenticationMethod * System.Data.SqlClient.SqlAuthenticationProvider -> bool
Public Shared Function SetProvider (authenticationMethod As SqlAuthenticationMethod, provider As SqlAuthenticationProvider) As Boolean

參數

authenticationMethod
SqlAuthenticationMethod

驗證方法。

provider
SqlAuthenticationProvider

驗證提供者。

傳回

true 若手術成功;否則, false (例如現有提供者不允許覆蓋)。

適用於