Creates a new command.
HRESULT CreateCommand( IUnknown *pUnkOuter, REFIID riid, IUnknown **ppCommand);
[in] A pointer to the controlling IUnknown interface if the new command is being created as part of an aggregate. It is a null pointer if the command is not part of an aggregate.
[in] The IID of the interface requested on the command.
[out] A pointer to memory in which to return the interface pointer on the newly created command.
The method succeeded.
A provider-specific error occurred.
ppCommand was a null pointer.
The command did not support the interface specified in riid.
The provider did not have enough memory to create the command.
ITransaction::Commit or ITransaction::Abort was called, and the object is in a zombie state.
pUnkOuter was not a null pointer, and the provider is an OLE DB 1.0 or 1.1 provider that does not support aggregation of the command object being created.
pUnkOuter was not a null pointer, and riid was not IID_IUnknown.
The provider would have to open a new connection to support the operation, and DBPROP_MULTIPLECONNECTIONS is set to VARIANT_FALSE.
If the session is transacted, the command and any actions performed as a result of executing that command are within the scope of the transaction.