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();  

适用于