VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 8

Programming With ADO

So far, this chapter has mostly discussed automatic ways to set up ADO Connection, Command, and Recordset objects using Data Environment Designers or the ADO Data Control.

For most serious applications, however, you will need to directly program the ADO object model in VB code.

To program ADO objects directly, you must set your VB project to refer to the latest version of the Microsoft ActiveX Data Objects Library from the Project, References menu dialog box, as shown in Figure 8.24.

Setting a project reference to the ADO Library.
FIGURE 8.24 Setting a project reference to the ADO Library.

You basically have three main concerns when you program with ADO in VB:

  • Setting up and maintaining a connection to data with the Connection object

  • Retrieving rows or otherwise manipulating the data with the Recordset object, the Command and Parameter objects, or the Connection object

  • Determining the exact behavior and nature of the rows of data returned by a Connection or Command and manipulating the data's individual fields and rows with the Recordset and Field objects

The following sections discuss the programming of these ADO objects.


<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved