Command Object Interfaces

The following table shows the mandatory and optional interfaces defined by OLE DB for a command object.

Command


Interface

Required?
Implemented by OLE DB Template Classes?
IAccessor Mandatory Yes
IColumnsInfo Mandatory Yes
ICommand Mandatory Yes
ICommandProperties Mandatory Yes
ICommandText Mandatory Yes
IConvertType Mandatory Yes
IColumnsRowset Optional No
ICommandPrepare Optional No
ICommandWithParameters Optional No
ISupportErrorInfo Optional No

The command object uses the IAccessor to specify parameter bindings. The consumer calls IAccessor::CreateAccessor, passing it an array of DBBINDING structures. DBBINDING contains information on the column bindings (type, length, and so on). The provider receives the structures and determines how the data should be transferred and whether conversions are necessary.

The ICommandText interface provides a way to specify a text command. The ICommandProperties interface handles all of the command properties.

Back to the OLE DB Provider Template Architecture