OdbcFactory.CreateCommand Methode

Definition

Gibt eine stark typisierte DbCommand-Instanz zurück.

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

Gibt zurück

DbCommand

Eine neue stark typisierte DbCommand-Instanz.

Beispiele

Das folgende Codefragment gibt eine stark typierte DbCommand Instanz zurück:

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

Gilt für: