Bagikan melalui


OleDbFactory.CreateCommand Metode

Definisi

Mengembalikan instans yang ditik DbCommand dengan kuat.

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

Mengembalikan

Instans baru yang dititik kuat dari DbCommand.

Contoh

Fragmen kode berikut mengembalikan instans yang sangat ditik DbCommand :

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

Berlaku untuk