Creating an OLE DB Provider
The recommended way to create an OLE DB provider is to use the wizards to create an ATL COM project and a provider and then modify the files using the OLE DB templates. As you customize your provider, you can comment out unwanted properties and add optional interfaces.
The basic steps are as follows:
Use the ATL Project Wizard to create the basic project files and the ATL OLEDB Provider Wizard to create the provider (select ATL OLEDB Provider from the Installed > Visual C++ > ATL folder in Add New Item).
The project must include MFC support before adding a ATL OLEDB Provider.
Edit the property maps in CustomDS.h, CustomSess.h, and CustomRS.h. The wizard creates property maps that contain all properties that a provider might implement. Go through the property maps and remove or comment out properties that your provider does not need to support.
When you are ready to test your provider, you can test it by trying to find the provider in a provider enumeration. For examples of test code that finds a provider in an enumeration, see the CATDB and DBVIEWER samples or the example in Implementing A Simple Consumer.
Add any additional interfaces you want. For an example, see Enhancing the Simple Read-Only Provider.
By default, the wizards generate code that is OLE DB level 0 compliant. To ensure that your application remains level 0 compliant, do not remove any of the wizard-generated interfaces from the code.
Submit and view feedback for