Condividi tramite


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

Si applica a