beginners tutorial - Learn VB6
VB6 tutorial - Learn Advanced VB6
VB .NET - Learn Visual Basic .NET
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
You refer to the Data Environment's Recordset with this syntax:
The ADO Data Control differs in the following ways from a Data
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.
Setting Up the ADO Data Control
The ADO Data Control's EOFAction and BOFAction
Binding VB Controls to the ADO Data Control's
Adding Records With the ADO Data Control
Editing Existing Records With the ADO Data
Canceling Pending Editing Changes on Bound
Programming Other Actions on the ADO Data
The ADO Control's Error Event
Other Events of the ADO Data Control
<< Previous | Contents
| Next >>