Implementing OLE DB providers


ESRI has implemented Microsoft®’s OLE DB consumer/provider model to serve external data to ArcGIS applications. If you wish to develop your own applications to serve your data, we recommend the following:
  1. Implement a minimum (level 0) OLE DB 2.0 provider, as defined by Microsoft. Further information on Microsoft’s OLE DB provider specification can be obtained from http://www.microsoft.com/data and http://www.microsoft.com/data/oledb/prodinfo.htm.
  2. Adopt the OpenGIS® Simple Features Specification for OLE/COM from the Open GIS Consortium (OGIS) if you intend to serve spatial data.

Microsoft’s Minimum (level 0) OLE DB Provider Requirements

Providers implementing the minimum provider functionality can rely on common service components to implement the base consumer functionality. Supporting an interface means supporting all methods within that interface (none return E_NOTIMPL). Supporting a property means supporting the setting of and associated behavior of all possible values for a property. Supporting the required rowset properties means that setting any combination of the required properties must yield a rowset that reflects at least those properties. It does not mean that those properties are always true for any rowset if the user has not requested the property.
The minimum level provider interfaces are:
(Source: http://www.microsoft.com/data/oledb/techinfo/oledbleveling2.htm)
Object
Any OLE DB provider
Updatable providers
DataSource
IDBCreateSession
 
 
IDBInitialize
 
 
IDBProperties
 
 
IPersist
 
Session
IGetDataSource
 
 
IOpenRowset
 
 
ISessionProperties
 
Rowset
IAccessor
IConnectionPointContainer
 
IConvertType
IRowsetChange
 
IColumnsInfo
 
 
IRowset
 
 
IRowsetIdentity
 
 
IRowsetInfo
 
Rowset Behavior
DBPROP_CANHOLDROWS
DBPROP_OWNUPDATEDELETE
 
 
DBPROP_OWNINSERT
 
 
DBPROP_REMOVEDELETED

To be consumable by ArcGIS, you will also need to implement two standard Schema Rowsets, Tables & Columns rowsets, using the IDBSchemaRowset interface. This is in addition to the minimal OLE DB interfaces listed above. Please refer to Microsoft’s documentation on IDBSchemaRowset, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbidbschemarowset.asp, for further information.
Options for developing your own provider include:
  1. Use Microsoft’s ATL OLE DB template to create your provider.
  2. Use Microsoft’s simple OLEDB provider toolkit in the Data Access 2.x SDK for creating read-only providers.
  3. Use a 3rd party OLE DB provider toolkit. For example, http://www.simba.com/index.htm.
  4. Write a provider in C++ using standard ATL classes.

OGIS Requirements

If you intend to serve spatial data, to conform to the OGIS OLE/COM Component Specification standards you must:
  1. Register your provider in the OGISDataProvider component category. (Consumers can then distinguish it from other OLE DB providers.)
  2. Implement IColumnsRowset.
  3. Implement the OGIS Feature Tables, OGIS Geometry Columns, & OGIS Spatial Reference Systems Schema rowsets to support GIS metadata.
For further information on the OGIS specification, please refer to http://www.opengis.org/techno/specs.htm.

ADO

Many developers may wish to implement their customized OLE DB providers in conjunction with Microsoft's ActiveX® Data Objects (ADO) data access model. For further information on mapping ADO methods to OLE DB interfaces, please refer to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wp/htm/mapping_ado_methods_to_ole_db_interfaces.asp.