DB2®Factory.CreateCommand Method
Returns a DbCommand instance.
- Namespace:
IBM.Data.DB2- Assembly:
IBM.Data.DB2(inIBM.Data.DB2.dll)
Syntax
[Visual Basic]
Public Overrides Function CreateCommand As DbCommand
[C#]
public override DbCommand CreateCommand ()
[C++]
public:
virtual DbCommand^ CreateCommand () override
[JScript]
public override function CreateCommand () : DbCommand
Return value
A DbCommand instance, which can represent SQL statements or stored procedures you run against Db2® family databases through the IBM® Data Server Provider for .NET.
Example
[C#] The following example demonstrates the creation of a DbCommand instance, using the DB2Factory.CreateCommand method.
[C#]
DB2Factory myFactory = DB2Factory.Instance;
DbCommand cmd = myFactory.CreateCommand();