Condividi tramite


OdbcFactory.CreateCommand Metodo

Definizione

Restituisce un'istanza DbCommand fortemente tipizzata.

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

Restituisce

Nuova istanza della classe DbCommand fortemente tipizzata.

Esempio

Il frammento di codice seguente restituisce un'istanza fortemente tipizzata DbCommand :

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

Si applica a