ConnectionDialog.TryToConnect メソッド

定義

UI を表示せずに、指定された接続情報を使用して接続を開きます。

public:
 System::Windows::Forms::DialogResult TryToConnect(System::Windows::Forms::IWin32Window ^ parent, Microsoft::SqlServer::Management::Smo::RegSvrEnum::UIConnectionInfo ^ % connectInfo, [Runtime::InteropServices::Out] System::Data::IDbConnection ^ % connection);
public System.Windows.Forms.DialogResult TryToConnect (System.Windows.Forms.IWin32Window parent, ref Microsoft.SqlServer.Management.Smo.RegSvrEnum.UIConnectionInfo connectInfo, out System.Data.IDbConnection connection);
member this.TryToConnect : System.Windows.Forms.IWin32Window * UIConnectionInfo * IDbConnection -> System.Windows.Forms.DialogResult
Public Function TryToConnect (parent As IWin32Window, ByRef connectInfo As UIConnectionInfo, ByRef connection As IDbConnection) As DialogResult

パラメーター

parent
IWin32Window

メイン サーバーです。

connectInfo
UIConnectionInfo

使用する接続情報。

connection
IDbConnection

SqlConnection です。

戻り値

接続するデータベース接続です。

適用対象