共用方式為


OracleClientFactory.CreateCommand 方法

定義

傳回強型別的 DbCommand 執行個體。

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

傳回

DbCommand 的新強型別執行個體。

範例

下列代碼段會傳回強型別 DbCommand 實例。

Dim newFactory As OracleClientFactory = OracleClientFactory.Instance  
Dim command As DbCommand = newFactory.CreateCommand()  
OracleClientFactory newFactory = OracleClientFactory.Instance;  
DbCommand command = newFactory.CreateCommand();  

適用於