0% found this document useful (0 votes)
49 views

The ADO Data Control

The ADO Data Control allows applications to access data from various sources using OLE DB. It features four main objects - Connection, Command, Recordset, and Stream. The document discusses how to add an ADO Data Control to a project, connect it to a database by building a connection string, set its RecordSource property, and create bound controls to display data fields.

Uploaded by

tamirat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

The ADO Data Control

The ADO Data Control allows applications to access data from various sources using OLE DB. It features four main objects - Connection, Command, Recordset, and Stream. The document discusses how to add an ADO Data Control to a project, connect it to a database by building a connection string, set its RecordSource property, and create bound controls to display data fields.

Uploaded by

tamirat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 11

The ADO Data Control

Universal Data Access


Open Database Connectivity (ODBC)
standard for accessing data in databases
OLE-DB
allows access to data in many formats
faster and easier to use than ODBC
Application

ADO

OLE-DB

OLE-DB OLE-DB OLE-DB OLE-DB OLE-DB


Provider Provider Provider Provider Provider

ODBC

ODBC SQL
Access Oracle Excel
Data Server
ADO, DAO and RDO in Visual Basic
In Visual Basic, three data access interfaces are
available to you:
ActiveX Data Objects (ADO)
Remote Data Objects (RDO)
Data Access Objects (DAO)
Data access technology is constantly evolving, and
each of the three interfaces represents a different
stage of development for data access technology.
The latest is ADO. It features a simpler yet
more flexible object model than either RDO or
DAO. For new projects, you should use ADO as
your data access interface.
The ADO Object Model
Four main objects:
* Connection the link between the program
and the data store
* Command allows you to run commands
against the data store
* Recordset contains all the data returned from
a specific action on the data store
* Stream allows the manipulation of data held
in web resources, such as HTML files
Using the ADO Data Control
Add the Microsoft ADO Data Control 6.0 (OLEDB)
component to your project.
Create an instance of the ADO Data Control on your
form.
Connect to a database with the ADO Data Control by
building a connection string.
Set the RecordSource property of the ADO Data
Control
Create bound controls on your form.
Building a Connection String
In the properties window of the ADO Data
controls choose the ConnectionString property.
3 Methods
From the property pages, choose Use Connection
String and choose Build
From the Provider tab in the Data Link Properties
dialog box, specify which data provider to use.
use Microsoft Jet 4.0 OLE DB Provider for Access
databases
choose Next >> to bring up the Connection tab of the
Data Link Properties dialog box
Building a Connection String
Three methods
Use a data Data Link File
Use an ODBC Data Source Name
Use a Connection String

Back
Building a Connection String
From the Connection tab, enter your
database name and path (or browse for it)
Leave the default log on
information
Test Connection
Set the RecordSource property of
the ADO Data Control
In the properties window of the ADO Data controls
choose the RecordSource property.
Choose a Command Type
adCmdUnknown
adCmdTable
adCmdText
adCmdStoredProc
Select a table or enter
an SQL statement
Creating Bound Controls
Many different controls that can hold text
and graphics can be bound to a field in an
ADO Data control.
Set the DataSource property of the bound
control to the ADO Data Control.
Set the DataField property of the bound
control to the field you want to display

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy