IDBCreateCommand::CreateCommand

OLE DB Programmer's Reference

Creates a new command.

HRESULT CreateCommand(    IUnknown     *pUnkOuter,    REFIID        riid,    IUnknown    **ppCommand);

Parameters

pUnkOuter
[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.
riid
[in]
The IID of the interface requested on the command.
ppCommand
[out]
A pointer to memory in which to return the interface pointer on the newly created command.

Return Code

S_OK
The method succeeded.
E_FAIL
A provider-specific error occurred.
E_INVALIDARG
ppCommand was a null pointer.
E_NOINTERFACE
The command did not support the interface specified in riid.
E_OUTOFMEMORY
The provider did not have enough memory to create the command.
DB_E_NOAGGREGATION
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.

DB_E_OBJECTOPEN
The provider would have to open a new connection to support the operation, and DBPROP_MULTIPLECONNECTIONS is set to VARIANT_FALSE.

Comments

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.

See Also

ICommand

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net