SlideShare uma empresa Scribd logo
1 de 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
OLE-DB
Application
OLE-DB
Provider
OLE-DB
Provider
OLE-DB
Provider
OLE-DB
Provider
OLE-DB
Provider
ODBC
Data
Access
SQL
Server
Oracle Excel
ODBC
ADO
…
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
control’s 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 control’s
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

Mais conteúdo relacionado

Mais procurados

Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .NetGreg Sohl
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.netJaya Kumari
 
Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Elizabeth alexander
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookMuralidharan Radhakrishnan
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)Syed Hassan Ali
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESVENNILAV6
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programmingRoger Argarin
 
Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Sanjit Shaw
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts Bharat Kalia
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.netMUKALU STEVEN
 

Mais procurados (20)

Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
Introduction to vb.net
Introduction to vb.netIntroduction to vb.net
Introduction to vb.net
 
Java awt (abstract window toolkit)
Java awt (abstract window toolkit)Java awt (abstract window toolkit)
Java awt (abstract window toolkit)
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
 
OOP java
OOP javaOOP java
OOP java
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIES
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programming
 
Polymorphism in c++(ppt)
Polymorphism in c++(ppt)Polymorphism in c++(ppt)
Polymorphism in c++(ppt)
 
Html forms
Html formsHtml forms
Html forms
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
 
ADO .Net
ADO .Net ADO .Net
ADO .Net
 
Java Notes
Java NotesJava Notes
Java Notes
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Lecture 1 introduction to vb.net
Lecture 1   introduction to vb.netLecture 1   introduction to vb.net
Lecture 1 introduction to vb.net
 
07 java variables
07   java variables07   java variables
07 java variables
 

Destaque

Data base connectivity and flex grid in vb
Data base connectivity and flex grid in vbData base connectivity and flex grid in vb
Data base connectivity and flex grid in vbAmandeep Kaur
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menukuldeep94
 
Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverAmmara Arooj
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NETrchakra
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)pbarasia
 
Visual Basic 6 Data Base
Visual Basic 6 Data BaseVisual Basic 6 Data Base
Visual Basic 6 Data BaseSpy Seat
 
Database programming in vb net
Database programming in vb netDatabase programming in vb net
Database programming in vb netZishan yousaf
 
7) packaging and deployment
7) packaging and deployment7) packaging and deployment
7) packaging and deploymenttechbed
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languagesactanimation
 
Introduction to Project Development using Visual Basic
Introduction to Project Development using Visual BasicIntroduction to Project Development using Visual Basic
Introduction to Project Development using Visual BasicMuralidharan Radhakrishnan
 
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VISUAL BASIC 6 - CONTROLS AND DECLARATIONSVISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VISUAL BASIC 6 - CONTROLS AND DECLARATIONSSuraj Kumar
 
Introduction to NS2 - Cont..
Introduction to NS2 - Cont..Introduction to NS2 - Cont..
Introduction to NS2 - Cont..cscarcas
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database FundamentalsAnanda Gupta
 

Destaque (20)

Data base connectivity and flex grid in vb
Data base connectivity and flex grid in vbData base connectivity and flex grid in vb
Data base connectivity and flex grid in vb
 
VB6 Using ADO Data Control
VB6 Using ADO Data ControlVB6 Using ADO Data Control
VB6 Using ADO Data Control
 
Visual Basic menu
Visual Basic menuVisual Basic menu
Visual Basic menu
 
Database Connection
Database ConnectionDatabase Connection
Database Connection
 
Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql server
 
Visual basic 6
Visual basic 6Visual basic 6
Visual basic 6
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Visual Basic 6 Data Base
Visual Basic 6 Data BaseVisual Basic 6 Data Base
Visual Basic 6 Data Base
 
Base de datos
Base de datosBase de datos
Base de datos
 
Database programming in vb net
Database programming in vb netDatabase programming in vb net
Database programming in vb net
 
7) packaging and deployment
7) packaging and deployment7) packaging and deployment
7) packaging and deployment
 
Timer control
Timer controlTimer control
Timer control
 
Copmuter Languages
Copmuter LanguagesCopmuter Languages
Copmuter Languages
 
Introduction to Project Development using Visual Basic
Introduction to Project Development using Visual BasicIntroduction to Project Development using Visual Basic
Introduction to Project Development using Visual Basic
 
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VISUAL BASIC 6 - CONTROLS AND DECLARATIONSVISUAL BASIC 6 - CONTROLS AND DECLARATIONS
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
 
Active x
Active xActive x
Active x
 
Session Slide
Session SlideSession Slide
Session Slide
 
Introduction to NS2 - Cont..
Introduction to NS2 - Cont..Introduction to NS2 - Cont..
Introduction to NS2 - Cont..
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database Fundamentals
 

Semelhante a ADO CONTROLS - Database usage

Semelhante a ADO CONTROLS - Database usage (20)

Introduction to ado.net
Introduction to ado.netIntroduction to ado.net
Introduction to ado.net
 
Database connectivity and web technologies
Database connectivity and web technologiesDatabase connectivity and web technologies
Database connectivity and web technologies
 
(ATS3-PLAT04) Database Connectivity for Application Development
(ATS3-PLAT04) Database Connectivity for Application Development(ATS3-PLAT04) Database Connectivity for Application Development
(ATS3-PLAT04) Database Connectivity for Application Development
 
Ado .net
Ado .netAdo .net
Ado .net
 
Latest Advance Animated Ado.Net With JDBC
Latest Advance Animated Ado.Net With JDBC Latest Advance Animated Ado.Net With JDBC
Latest Advance Animated Ado.Net With JDBC
 
Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
 
PI-RDBMS.ppt
PI-RDBMS.pptPI-RDBMS.ppt
PI-RDBMS.ppt
 
WEB PROGRAMMING USING ASP.NET
WEB PROGRAMMING USING ASP.NETWEB PROGRAMMING USING ASP.NET
WEB PROGRAMMING USING ASP.NET
 
Chapter 15
Chapter 15Chapter 15
Chapter 15
 
Dataaccess in asp.net
Dataaccess in asp.netDataaccess in asp.net
Dataaccess in asp.net
 
Ch06 ado.net fundamentals
Ch06 ado.net fundamentalsCh06 ado.net fundamentals
Ch06 ado.net fundamentals
 
ADO.NET -database connection
ADO.NET -database connectionADO.NET -database connection
ADO.NET -database connection
 
PPT temp.pptx
PPT temp.pptxPPT temp.pptx
PPT temp.pptx
 
Microsoft data access components
Microsoft data access componentsMicrosoft data access components
Microsoft data access components
 
Jdbc
JdbcJdbc
Jdbc
 
Jdbc
JdbcJdbc
Jdbc
 
ADO .NET by Sonu Vishwakarma
ADO .NET by Sonu VishwakarmaADO .NET by Sonu Vishwakarma
ADO .NET by Sonu Vishwakarma
 
Ado
AdoAdo
Ado
 
Ado.net
Ado.netAdo.net
Ado.net
 
Ado Net
Ado NetAdo Net
Ado Net
 

Último

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 

Último (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 

ADO CONTROLS - Database usage

  • 1. The ADO Data Control
  • 2. 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
  • 4. 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.
  • 5. 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
  • 6. 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.
  • 7. Building a Connection String • In the properties window of the ADO Data control’s 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
  • 8. Building a Connection String • Three methods – Use a data Data Link File – Use an ODBC Data Source Name – Use a Connection String Back
  • 9. 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
  • 10. Set the RecordSource property of the ADO Data Control • In the properties window of the ADO Data control’s choose the RecordSource property. • Choose a Command Type – adCmdUnknown – adCmdTable – adCmdText – adCmdStoredProc • Select a table or enter an SQL statement
  • 11. 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

Notas do Editor

  1. Each OLE-DB data provider is a unit of code, written in a language such as C++ or Java which uses OLE-DB objects to provide the instructions required to communicate and pass data between the data store and the data provider. ActiveX Data Objects (ADO) sits between the application itself and the OLE-DB layer. In our case, it’s the interface between the ASP code and the OLE-DB provider. You can use ADO with any COM-compliant programming language such as Visual Basic, Visual C++, or Java.
  2. DAO (Data Access Objects) was the first object-oriented interface that exposed the Microsoft Jet database engine (used by Microsoft Access) and allowed Visual Basic developers to directly connect to Access tables - as well as other databases - through ODBC. DAO is suited best for either single-system applications or for small, local deployments. (Remote Data Objects) is an object-oriented data access interface to ODBC combined with the easy-to-use style of DAO, providing an interface that exposes virtually all of ODBC’s low-level power and flexibility. RDO is limited, though, in that it doesn't access Jet or ISAM databases very well, and that it can access relational databases only through existing ODBC drivers. However, RDO has proven to be the interface of choice for a large number of SQL Server, Oracle, and other large relational database developers. ODBC (Open Database Connectivity) A standard protocol for database servers providing a common language for Windows applications to gain access to a database on a network. You install ODBC drivers for various databases that enable you to connect to the databases and access their data.
  3. The five main objects have a “flat” hierarchy which means that you can create any ADO object without the need to create a hierarchy of parent and grandparent objects. For example, you can use a Recordset object to make a direct request from the data store without creating an explicit Connection object in your code first.
  4. To add the ADO data control, right click the toolbox, choose components and add Microsoft ADO Data Control 6.0 (OLEDB)
  5. Connection information can be stored in a separate file known as a connection file or data link files. This file has a suffix of “.uld”. You can build connection files from the Control Panel. Another option is to use an existing ODBC data source or create a new one. With this option, you can establish a connection to multiple types of databases using the Open Database Connectivity (ODBC) standards. The third option is to build a connection string. This option takes advantage of the OLE DB and ADO. As the OLE DB and ADO technologies are much newer than ODBC, fewer vendors support OLE DB.
  6. The options on the Connection tab will vary depending on the provider selected. These options assist you in building the string stored into the ConnectionString property. The contents of the Advanced tab will also vary depending upon the provider selected. This tab contains other options to configure the data link. The All tab allows you to manually set each of the options pertaining to the data link.
  7. The command type is initially set to adCmdUnknown, indicating that the type of command is unknown. When set to adCmdTable, the RecordSource property consists of the name of the database table. When set to adCmdText, the RecordSource property is viewed as a text string. This string typically contains an SQL statement. When set to adCmdStoredProc, the command type is a stored procedure. A stored procedure is used with an SQL server and contains a precompiled SQL statement.
  8. You will need a separate ADO Data Controls on your form for each table or query you need to access.