OdbcFactory.CreateConnection Método

Definição

Devolve uma instância fortemente tipada DbConnection .

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

Devoluções

Uma nova instância fortemente tipada de DbConnection.

Exemplos

O seguinte fragmento de código devolve uma instância fortemente tipada DbConnection :

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

Aplica-se a