Partilhar via


OleDbFactory.CreateCommand Método

Definição

Retorna uma instância de DbCommand fortemente tipada.

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

Retornos

Uma nova instância fortemente tipada de DbCommand.

Exemplos

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

Dim newFactory As OleDbFactory = OleDbFactory.Instance
Dim cmd As DbCommand = newFactory.CreateCommand()
OleDbFactory newFactory = OleDbFactory.Instance;
DbCommand cmd = newFactory.CreateCommand();

Aplica-se a