Partager via


OLE DB Providers Overview

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.

OLE DB providers architecture overview

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?was introduced in OLE DB 2.5. These providers manage folders and documents and are explained in Resource Rowsets and Document Source Providers.

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

Conceptual Programming Models in OLE DB

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

For more information about provider templates, Search for "OLE DB templates" in the MSDN Library.

For more information about OLE DB providers, see the section on Universal Data Access in the MSDN Library.

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

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.

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.

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. For more information, see the Indexing Service resource on Microsoft TechNet.

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. For more information, see the SNA Server resources on Microsoft TechNet.

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++. For more information, see the Microsoft Visual C++ Developer Center, on the Microsoft Web site.

Additional Resources

See the "Data Access and Storage" home page at the Microsoft Data Access and Storage Developer Center, in the MSDN Library, for late-breaking information about data access 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.