Partilhar via


OdbcFactory.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 OdbcFactory = OdbcFactory.Instance
Dim cmd As DbCommand = newFactory.CreateCommand()
OdbcFactory newFactory = OdbcFactory.Instance;
DbCommand cmd = newFactory.CreateCommand();

Aplica-se a