OleDbFactory.CreateConnection Método

Definição

Retorna uma instância de DbConnection fortemente tipada.

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

Retornos

Uma nova instância fortemente tipada de DbConnection.

Exemplos

O fragmento de código a seguir retorna uma instância fortemente tipada DbConnection :

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

Aplica-se a