Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 16

DEPARTMENT OF TECHNICAL EDUCATION

ANDHRA PRADESH
Name : Y. Vijaya Bhaskara Reddy
Designation : Senior Lecturer
Branch : Commercial and Computer
Practice
Institute : G.P.W ., Kakinada
Year/Semester : VI Semester
Subject : Visual Basic – II
Subject Code : CCP – 603
Topic : Database Programming
Duration : 50 Mts
Sub Topic : Data Access Objects
Teaching Aids : PPTs
CCP603.14 1
Objective :

On completion of this period, you would be


able to:
 Know about Data Access Objects

CCP603.14 2
Structure Of The Period :

 Understanding the DAO object model


 Objects in the DAO Object model

CCP603.14 3
Recap :

 DAO is relatively old and slow technology


when compared with ADO and RDO
 DAO is difficult for coding
 DAO 3.6 is the final version in this
technology

CCP603.14 4
Understanding the DAO Object
model:
 The DAO object models the structure of a
relational database and provides connection
between VB application and database
 The properties and methods of DAO Objects
help in the following operations:
 Creating databases
 Defining tables, fields, and indexes
 Establishing relations between tables
 Navigating and querying the database
CCP603.14 5
Objects in the DAO Object
model:
There are 15 objects in the DAO object model
 DBEngine object : This base DAO
object holds all other objects and
maintains engine options
 Workspace object : Defines and
manages the current user session.

CCP603.14 6
Objects in the DAO Object model:

 Database object Represents a database with at


least one open connection. This can be a
Microsoft Jet database or an external data source
 TableDef object Contains both Field and Index
objects to describe the database tables
 QueryDef object Represents a stored SQL
query statement, with zero or more parameters,
maintained in a Microsoft Jet database

CCP603.14 7
Objects in the DAO Object model:
 Recordset object Represents a query result set
with a cursor. DAO has five types of Recordset
objects: table, dynaset, snapshot, forward-only,
and dynamic
 Container object Represents a particular set of
objects in a database for which you can assign
permissions in a secure workgroup
 In addition to the Container objects provided by
DAO, an application may define its own
Container objects (such as saved forms,
modules, reports, or script macros)

CCP603.14 8
Objects in the DAO Object model :

 Relational object Represents a relationship


between fields in tables and queries
 Field object Represents a field in a table,
query, index, relation, or recordset
 Index object Represents an index on a table
in the database

CCP603.14 9
Objects in the DAO Object model :
 Parameter object Represents a value
associated with a QueryDef object.
 Document object Contains information about
individual objects in the database (such as
tables, queries, or relationships)
 User object Represents a user account with
particular access permissions

CCP603.14 10
Objects in the DAO Object model :
 Group object Represents a group of user
accounts that have common access
permissions in a particular workspace
 Error object Contains information about an
error that occurred during a DAO operation
 When more than one error occurs during a
single DAO operation, each individual error is
represented by a separate Error object

CCP603.14 11
Summary :
 The DAO object model is a collection of
objects that model the structure of a
relational database system

 The properties and methods of DAO


Objects help in doing various operations on
database

 There are 15 objects in the DAO object


model

CCP603.14 12
Quiz :
1. DAO has how many types of Recordset
Objects ?
Ans: 5
2. What are they ?
Ans: table,
dynaset,
snapshot,
forward-only and
dynamic

CCP603.14 13
Frequently Asked Questions :

1. List out the objects in the DAO Object


Model.

2. List out the different types of Recordset


Objects in DAO.

CCP603.14 14
Assignment :

1. Briefly explain Database Object and


Tabledef Object.

CCP603.14 15
Thank You

CCP603.14 16

You might also like