Components

When you build an OLE DB provider with Microsoft's OLE DB Simple Provider Toolkit, you are actually assembling a provider from several Microsoft component technologies.

Providers built with the Toolkit consist of an OLE DB Simple Provider DLL (MSDAOSP.DLL) that interoperates with one or more implementations of Internet Explorer's OSP (for OLE DB Simple Provider) API. OSP supplies interfaces for basic provider capabilities over simple data, and the OLE DB Simple Provider expands the simple data provider functionality, adding comprehensive support for core OLE DB interfaces and OLE DB properties, with features such as bookmarks and unique row handles (for improved data identification), and limited data conversion capabilities.

The following figure shows, at a high level, the architecture of an OLE DB provider written with the Simple Provider Toolkit:

Following are descriptions of the main components shown in the figure and how they work:

ADO and Other OLE DB Consumers

These can be any OLE DB-compliant application or control on a computer on which the provider is registered. If you are using ADO Recordsets as a consumer, you code the provider identification information in the connection string and receive the data in the form of ADO Recordsets.

OLE DB Simple Provider DLL

The OLE DB Simple Provider DLL (MSDAOSP.DLL) acts as the go-between for the OSP Data Object and the consuming application or control. The DLL consists of code that understands OSP interface calls and does the following:

MSDAOSP.DLL assumes that OSP is correctly implemented (according to the OSP specification) and does no internal checking of OSP parameters or return codes.

OSP Data Object

To accommodate different programming language environments, multiple data sources and their OSP implementations, and coordinate different types of notification, the simple data provider architecture includes an abstraction called the OSP Data Object. This object needs to be coded and registered before it is instantiated and used with the OLE DB Simple Provider DLL (MSDAOSP.DLL).

An OSP Data Object implements one or more instances of OSP, with each instance giving access to a particular source of data. The OSP Data Object includes methods that allow the OLE DB Simple Provider DLL to request the desired OSP implementation and, thus, the desired data source:

In both of the above implementations, the decision as to which OSP to request is based on the DataMember string that is passed in to the OSP Data Object. The format and syntax of that string is implementation-defined and must be specified by each OSP developer and to users of the OSP data source.

To expose a provider's full OLE DB functionality, the OSP Data Object needs to reference the OLE DB Simple Provider DLL (MSDAOSP.DLL). The developer can use one of two methods to accomplish this:

After the above step has been completed, the developer must register the OSP Data Object using regsvr32.exe (in Visual Basic and Visual C++ implementations) or javareg (in Visual J++).

The OSP Data Object also sends notifications to MSDAOSP.DLL, and data source notifications to MSDAOSP.DLL or external data consumers or controls (that is, applications outside the provider framework but able to access the same data sources). Where the data source notifications go to depends on which of the objects (MSDAOSP.DLL or an external data consumer) obtained the instance of the data source object.