OLE DB Objects Consumed by Distributed Queries
From Accessing and Changing Relational Data
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 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 a 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 meta data. Rowsets needed are TABLES and COLUMNS. Other rowsets used, if available, are TABLES_INFO, CATALOGS, INDEXES, STATISTICS, TABLE_STATISTICS, VIEWS, PRIMARY_KEYS, TABLE_PRIVILEGES, and COLUMN_PRIVILEGES. |
| IopenRowset | Yes | Open a rowset on a table, index, or histogram. | |
| IGetDataSource | Yes | Return to the data source object from a DB Session object. | |
| IDBCreateCommand | No | Create a command object (query). | |
| ITransactionLocal | No | Use to start a transaction on the provider. | |
| ITransactionJoin | No | Use 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 | Use for executing queries. |
| ICommandText | Yes | Use for defining the query text. | |
| ICommandProperties | Yes | Specify required properties on rowsets returned by the command. | |
| ICommandWith Parameters |
No | Use for parameterized query execution. | |
| ICommandPrepare | No | Use for preparing a command to get meta data. | |
| 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. |