Connecting to Microsoft Access with ADO - Create a reference to ADO
(Page 5 of 6 )
This is an important step where you will establish a reference to the Microsoft ActiveX Data objects library, which allows you to use the methods, properties and events related to these objects. In the Microsoft Visual Basic screen go to Tools, click on it (do not right click), and from the drop down click References (it is usually the first one in the list). This brings up the window References - AdoTest as shown. You will see references to a whole lot of ADOs. Here the ADO 2.8 library is chosen; click OK. With this we can use the msado15.dll.

While you are in this screen, go and take a peek at the ADODB related objects in the Object Browser. I am showing the Connection property of ADODB. Items related to the connection are listed on the right hand side of this window. You can see how rich the interface is and how flexible it could be.

Next: Write code to open and close the ADODB connection to the database >>
More Microsoft Access Articles
More By Jayaram Krishnaswamy