OLE DB Objects Consumed by Distributed Queries

The following table shows the OLE DB objects and interfaces consumed by Transact-SQL distributed queries. An OLE DB provider must support at least a minimal set of objects and interfaces before it can be used in any Transact-SQL distributed queries. These objects and interfaces are marked with a Yes in the Required column of the table. The objects and interfaces with a No in the Required column are those needed only to support advanced distributed query functionality. If the interface is not supported by the provider, related Transact-SQL functionality is not supported. For example, if the IRowsetLocate and IRowsetChange interfaces are not supported, UPDATE or DELETE statements do not function on remote tables.

Object Interface Required Description
Data Source IDBInitialize Yes Initialize and set up data and security context.
  IDBCreateSession Yes Create DB Session object.
  IDBProperties Yes Get information about the capabilities of provider and set initialization properties.
  IDBInfo No Get information about the SQL syntax supported by the provider.
DB Session IDBSchemaRowset No Get table and/or column metadata. Rowsets needed are TABLES and COLUMNS. Other rowsets used, if available, are TABLES_INFO, CATALOGS, INDEXES, STATISTICS, VIEWS, PRIMARY_KEYS, TABLE_PRIVILEGES, and COLUMN_PRIVILEGES.
  IOpenRowset Yes Open a rowset on a table/index.
  IGetDataSource Yes Go back to the data source object from a DB Session object.
  IDBCreateCommand No Create a command object (query).
  ITransactionLocal No Used to start a transaction on the provider.
  ITransactionJoin No Used for distributed transaction support. If this interface is not supported, updates against a remote provider are not allowed in a user transaction.
Rowset (on a table) IRowset Yes Scan rows.
  IAccessor Yes Bind to columns in a rowset.
  IColumnsInfo Yes Get information about columns in a rowset.
  IRowsetInfo Yes Get information about rowset properties.
  IRowsetLocate No Required for UPDATE or DELETE operations and index-based lookups.
  IRowsetChange No Required for INSERT, UPDATE, or DELETE operations on a table. Rowsets against base tables should support this interface for supporting INSERT, UPDATE, or DELETE statements.
  IConvertType Yes Verify if a rowset supports specific data type conversions on its columns.
Rowset (on an index) IRowset Yes Scan rows.
  IAccessor Yes Bind to columns in a rowset.
  IColumnsInfo Yes Get information about columns in a rowset.
  IRowsetInfo Yes Get information about rowset properties.
  IRowsetIndex Yes Required for rowsets on an index; used for indexing functionality (set range, seek).
  IConvertType Yes Verify if the rowset supports specific data type conversions on its columns.
Command (optional) ICommand Yes Used for executing queries.
  ICommandText Yes Used for defining the query text.
  ICommandProperties Yes Specify required properties on rowsets returned by the command.
  ICommandWith
Parameters
No Used for parameterized query execution.
  ICommandPrepare No Used for preparing a command to get metadata.
Error (optional) IErrorRecords Yes Get a pointer to an IErrorInfo interface for an error record.
  IErrorInfo Yes Get a text description of an error record.
Any Object (optional) ISupportErrorInfo No Determine if a given interface supports error objects.

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.