OLE DB Provider Templates Reference
The classes and interfaces for the OLE DB Provider Templates can be grouped into the following categories. The reference material also includes information about the macros for OLE DB Provider Templates.
The classes use the following naming convention: a class named with the pattern
IWidgetImpl would provide an implementation of the interface
Creates a new session from the data source object and returns the requested interface on the newly created session. Mandatory interface on data source objects.
Implements session properties by calling a static function defined by the property set map. The property set map should be specified in your session class. Mandatory interface on sessions.
Provides a standard OLE DB rowset implementation without requiring multiple inheritance of many implementation interfaces. The only method for which you must provide implementation is
Provides a default implementation for the row handle, which is used in the
IRowsetImpl class. A row handle is logically a unique tag for a result row.
IRowsetImpl creates a new
CSimpleRow for every row requested in
OLE DB requires providers to implement an
HACCESSOR, which is a tag to an array of
DBBINDING structures. Provides
HACCESSORs that are addresses of the
BindType structures. Mandatory on rowsets and commands.
Delegates to a static function defined by the provider column map. Mandatory interface on rowsets and commands.
Gives information on the availability of type conversions on a command or on a rowset. Mandatory on commands, rowsets, and index rowsets. Implements the
IConvertType interface by delegating to the conversion object supplied by OLE DB.
IDBSchemaRowset interface and the templatized creator function
Opens and returns a rowset that includes all rows from a single base table or index. Mandatory interface for a session object.
This class inherits from IObjectWithSite and overrides IObjectWithSite::SetSite.
IRowsetCreatorImpl performs the same functions as
IObjectWithSite but also enables the OLE DB properties
IRowsetIdentity interface, which allows you to compare whether two rows of data are identical or not.
Provides an implementation of the
IRowset interface, which is the base rowset interface.
Implements the rowset properties by using the property set map defined in your command class. Mandatory interface on rowsets.
Implements broadcast functions to advise listeners on the connection point
IID_IRowsetNotify of changes to the contents of the rowset. Consumers that handle notifications implement IRowsetNotify and register it on that connection point.
Implements the OLE DB IRowsetUpdate interface, which enables consumers to delay the transmission of changes made with IRowsetChange to the data source and undo changes before transmission.
Provides an implementation of the
ICommand interface. This interface is not visible, but is handled by
ICommandTextImpl. A mandatory interface on the command object.
This implementation of the
ICommandProperties interface is provided by a static function defined by the
BEGIN_PROPSET_MAP macro. Mandatory on commands.
Sets, stores, and returns the command text. Mandatory on commands.
Creates a new command from the session object and returns the requested interface on the newly created command. Optional interface on session objects.
Other command classes are
IAccessorImpl, described in the Rowset Classes section above.
Data Source Classes
Creates and deletes the connection with the consumer. Mandatory interface on data source objects and optional interface on enumerators.
IDBProperties is a mandatory interface for data source objects and an optional interface for enumerators. However, if an enumerator exposes
IDBInitialize, it must expose
IDBProperties (properties on the data source).
Obtains an interface pointer to the data source object. Mandatory interface on the session.
Implements properties for a variety of OLE DB property interfaces (for example,
Implements the OLE DB IErrorRecords interface, adding records to and retrieving records from a data member.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.