• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Opening Databases > Connecting Using ADO

Connecting Using ADO

There are three objects for you to use in establishing a connection to a database using ADO. They will be largely unfamiliar to you if you're used to DAO. Which object you use depends in part on what you want to accomplish. One object, the Connection object, is discussed here. The remaining two, the Command object and the Recordset object, are discussed in Chapters 10, “Defining Fields and Records in DAO,” and 11, “Getting Data from Access and into Excel with ADO and DAO.”

Establishing a Reference to the ADO Library

Before you can use ADO at all, you need to establish a reference to the ADO library. If necessary, switch to the VBE and choose References from the Tools menu. Scroll down until you find the reference you want and fill its check box (see Figure 8.1). If you want to establish more than one reference, continue locating them and filling their check boxes. When you're through, click OK.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint