Create the DHO COM Project
Use Visual Basic to open the previous PublishersWebUI project, and choose Add Project from the File menu. From the Add Project dialog box, choose AxtiveX DLL to create a project file for the new DHO component. Visual Basic will create a new project with a default class module (Class1) and a new project group. Delete this newly created class from the project by selecting it in the Project Explorer window and choosing Remove from the Project menu.
If you haven't worked with project groups before, here's a short explanation. You know that a VBP project file contains a list of forms, classes, and code modules that make up a project. Similarly, a project group file contains a list of projects. Project group files have a VBG file type and are really handy when developing a multicomponent application. Just double-click the VBG file; the Visual Basic IDE automatically opens up everything you need.
Select the new project in the Project Explorer window, and choose Properties from the Project window. At a minimum, use the Project Properties dialog box to set the Project Name, Project Description, and Application Title to something appropriate such as PublishersDHO. Close the dialog box and save the project file by selecting Save PublishersDHO from the File menu. I suggest saving the DHO project files in a separate folder from the Web UI project files. Finally, save the project group by selecting Save Project Group As from the File menu, and give it a filename such as PublishersWebUI.VBG.
Recall that the purpose of the DHO component is to do the actual reading and writing of the data to the database so the PublishersWebUI project doesn't have to. Database connectivity is handled through ADO so you have to add a reference to the Microsoft ActiveX Data Object Library to the PublishersDHO project. You must also modify the PublishersWebUI project to remove the reference to the Microsoft ActiveX Data Object Library, and add a reference to the new PublishersDHO component. Do this by selecting References from the Project menu.