OleDbFactory.CreateConnection Methode

Definition

Gibt eine stark typisierte DbConnection-Instanz zurück.

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

Gibt zurück

Eine neue stark typisierte DbConnection-Instanz.

Beispiele

Das folgende Codefragment gibt eine stark typisierte DbConnection Instanz zurück:

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

Gilt für: