Creating the MyData Component Project

See Also

The MyData component is an ActiveX DLL that acts as a data source. In this example, we'll use it to provide data through an OLE DB Simple Provider — it could just as easily be used as an ODBC or OLE DB data source. First we'll need to add another project to the AXData project group.

Note   This topic is part of a series that walks you through creating sample data source components. It begins with the topic Creating Data Sources.

To add a test project to the project group

  1. On the File menu, click Add Project to open the Add Project dialog box.

    Important   Do not click Open Project or New Project, as these will close your control project.

  2. Double-click the ActiveX DLL icon to add a DLL component project. This will add a new project, Project 2, and a new class module, Class1, to the Project Explorer window.

  3. Select Project2 in the Project Explorer, then double-click the Name property in the Properties window and change the Name to MyDataComponent.

  4. Choose MyDataComponent Properties from the Project menu to display the Project Properties dialog. Set the properties for the MyDataComponent project as follows:
    Property Setting
    Project Description Sample OLE DB Simple Provider Component

  5. Select References from the Project menu. Add the following references in the References dialog box:
    Reference Purpose
    Microsoft Data Source Interfaces Allows the component to act as a data source.
    Microsoft OLE DB Simple Provider 1.5 Library Used to access data sources through the OLE DB Simple Provider interface.
    OLE DB Errors Type Library Provides error messages.

  6. Select Save Project Group from the File menu to save your changes before moving on to the next step.

In the next step, we'll create a class that implements the OLE DB Simple Provider interface.

Step by Step

This topic is part of a series that walks you through creating sample ActiveX data sources.

To See
Go to the next step Creating the MyOSPObject Class
Start from the beginning Creating Data Sources