OdbcFactory.CreateConnection OdbcFactory.CreateConnection OdbcFactory.CreateConnection OdbcFactory.CreateConnection Method

定義

厳密に型指定された DbConnection インスタンスを返します。Returns a strongly-typed DbConnection instance.

public:
 override System::Data::Common::DbConnection ^ CreateConnection();
public override System.Data.Common.DbConnection CreateConnection ();
override this.CreateConnection : unit -> System.Data.Common.DbConnection
Public Overrides Function CreateConnection () As DbConnection

戻り値

DbConnection の新しい厳密に型指定されたインスタンス。A new strongly-typed instance of DbConnection.

次のコード フラグメントは、厳密に型を返しますDbConnectionインスタンス。The following code fragment returns a strongly-typed DbConnection instance:

Dim newFactory As OdbcFactory = OdbcFactory.Instance  
Dim cmd As DbConnection = newFactory.CreateConnection()  
OdbcFactory newFactory = OdbcFactory.Instance;  
DbConnection cmd = newFactory.CreateConnection();  

適用対象