Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

VB .NET - Learn Visual Basic .NET

Systems Analysis - System analysis and Design tutorial for Software Engineering


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

Using the ADO Data Control (ADODC) In Visual Basic 6 (VB6)

Like a Data Environment, the ADO Data Control also simplifies, automates, or even eliminates some data programming tasks. It has the following similarities to the Data Environment Designer:
  • Both the Data Environment and the ADO Control expose a Recordset to the programmer

  • Both the Data Environment and the ADO Control are used to bind VB controls (such as DataGrid or TextBox controls) to a Recordset.

  • Both the Data Environment and the ADO Control enable you to determine the Recordset's cursor type, cursor location, locking strategy, and cache size.

  • When necessary, the programmer can bypass the automated user interface and directly manipulate the Recordset in code. Recordset manipulation is the same in code for both the ADO Data Control and the Data Environment, with but a single syntactic difference: You refer to the ADO Data Control's Recordset with the following syntax:

    ADDataControlName.Recordset

    You refer to the Data Environment's Recordset with this syntax:

    DataEnvironmentName.rsCommandName

The ADO Data Control differs in the following ways from a Data Environment, however:

  • The ADO Data Control supports only one Recordset at a time.

  • The ADO Data Control does not directly expose Command or Connection objects.

  • The ADO Data Control is visible at runtime and furnishes a visual navigation interface to the user.

The following sections discuss how to set up an ADO Data Control, how to manipulate it programmatically, and how to bind controls to its Recordset.

  1. Setting Up the ADO Data Control

  2. The ADO Data Control's EOFAction and BOFAction Properties

  3. Binding VB Controls to the ADO Data Control's Recordset

  4. Adding Records With the ADO Data Control

  5. Editing Existing Records With the ADO Data Control

  6. Canceling Pending Editing Changes on Bound Controls

  7. Programming Other Actions on the ADO Data Control's Recordset

  8. The ADO Control's Error Event

  9. Other Events of the ADO Data Control


  

<< Previous | Contents | Next >>

Home | Link to Us | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved