OleDbFactory.CreateCommand Méthode

Définition

Retourne une instance de DbCommand fortement typée.

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

Retours

Nouvelle instance fortement typée de DbCommand.

Exemples

Le fragment de code suivant retourne une instance fortement typée DbCommand :

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

S’applique à