MDAC 2.5 SDK - OLE DB Providers
OLE DB architecture is built upon the precept of an application accessing diverse data stores through a small application built specifically for that purpose. The application that uses OLE DB functionality is called the consumer, while the one that accesses the data by exposing OLE DB interfaces is called the provider.
Providers fall into two categories: those providing services and those providing data. A service provider encapsulates a service by producing and consuming data through OLE DB interfaces. It does not own its own data and, in reality, serves a dual role of consumer and provider. A service provider may also be further defined as a service component, which must work in conjunction with other service providers or components. The Cursor Service for OLE DB is an example of this. A data provider owns its own data and exposes it in tabular form. It is not dependent on other providers—service or data—to provide data to the consumer.
In addition to these two categories of providers, a special class of providers—called document source providers—has been introduced in OLE DB 2.5. These providers manage folders and documents and are explained in "Resource Rowsets and Document Source Providers" in Chapter 9 of the OLE DB Programmer's Reference.
Providers can be simple or complex, depending on the needs of the consumer. They can return data intact or perform operations on the data. A set of mandatory interfaces is required to expose the minimal level of functionality supported by the data store. OLE DB providers are not required to support the complete OLE DB interface. Optional interfaces can be used for additional functionality.
Because providers are made up of COM components that contain a series of standard interfaces, consumers can access them using any programming language.
Various forms of assistance are available for provider implementation and use.
For more information about | See |
OLE DB architecture | OLE DB Programmer's Reference |
Consumers and providers architecture | Consumers and Providers |
Guidelines for providers | Rules and guidelines for building and using providers are stated in specific provider documentation. Each OLE DB interface description also contains implementation guidelines. |
Provider templates | MSDN Library\Visual C++ Documentation\Reference\Microsoft Foundation Class Library and Templates\OLE DB Templates\Provider
Technical article Delivering Data to Universal Data Access via the OLE DB Provider Templates for Visual C++ 6.0 at the Microsoft® Visual C++® Web site. |
Simple Provider Toolkit designed for quickly building OLE DB providers over simple data stores | OLE DB Simple Provider (OSP) |
Samples for writing consumers and providers, including Rowset Viewer and Table Copy | OLE DB Samples |
Provider documentation template | The OLE DB Provider Standard Documentation Template |
Microsoft OLE DB providers are available from the Microsoft OLE DB Web site at http://www.microsoft.com/data/oledb/. Documentation exists for those listed in the following tables. Other providers are available from other vendors.
Data Providers
Source data | OLE DB data provider | Purpose |
ODBC | Microsoft OLE DB Provider for ODBC | Exposes data traditionally accessed using ODBC. |
Oracle | Microsoft OLE DB Provider for Oracle | Accesses Oracle 7.3 and Oracle8 data. |
SQL Server | Microsoft OLE DB Provider for SQL Server | Accesses SQL Server data from one or more sources. |
Microsoft Jet database | Microsoft OLE DB Provider for Microsoft Jet | Accesses data from Access, Paradox, dBASE, Excel, FoxPro®, and more. |
Service Providers
Source data | OLE DB service provider | Purpose |
Any | Microsoft OLE DB Persistence Provider | Persists retrieved data to a local file. |
Remote | Microsoft OLE DB Remoting Provider | Allows remote data exchange through existing providers. |
Microsoft Active Directory Service | Microsoft OLE DB Provider for Microsoft Active Directory Service (ADS) | Provides access and management services for network resources and access to heterogeneous directory services. See the Microsoft Windows® 2000 Server Web site for more information. |
Microsoft Indexing Service (formerly known as Microsoft Index Server) | Microsoft OLE DB Provider for Microsoft Indexing Service | Provides access to indexed file system and Web data using SQL queries. See the technical article Programmer's Guide to using Index Server Provider in VC++ at the Microsoft Visual C++ Web site. |
Any non-multidimensional | Microsoft Data Shaping Service for OLE DB | Creates hierarchical recordsets from a tabular format. |
AS/400 and VSAM | Microsoft OLE DB Provider for AS/400 and VSAM | Allows access to mainframe AS/400 or VSAM data through Microsoft's object-based OLE DB data access technology. See the Microsoft SNA Server Web site for more information. |
Any | Microsoft Cursor Service for OLE DB | Caches result sets on the client or the server. |
Any | Visual C++ 6.0 OLE DB Template Library | Examples and templates for writing consumers and providers in Microsoft Visual C++. See the Microsoft Visual C++ Web site for more information. |
Additional Resources
See the "Technical Materials" page of the Universal Data Access Web site at http://www.microsoft.com/data/techmat.htm or the "Microsoft Data Access Technical Articles" section of the Microsoft Data Access Components (MDAC) SDK for late-breaking information about MDAC SDK component technologies.
Other articles can be found in the Microsoft Developer Network (MSDN™) Library. Detailed articles concerning known provider limitations or workarounds can be found in the MSDN Knowledge Base.
For information on support for Microsoft Data Access Components, see "Getting Help from Microsoft Product Support Services."