Chapter 11. Using DAO to Access Data
WHAT'S IN THIS CHAPTER?
A look at new features available in DAO in Access 2007 and Access 2010
In-depth descriptions of objects you'll use in DAO to help create objects and work with data
As you've seen in previous chapters, VBA is the programming language you use to programmatically interact with the Access object model. You use VBA to manipulate Access-specific objects, such as forms, reports, and so on. But because Access is a relational database management system, you will undoubtedly find yourself also needing to programmatically interact with the data it contains, and indeed with the database design, or schema. Microsoft Access employs two data access object models: Data Access Objects (DAO) and ActiveX Data Objects (ADO).
Chapter 12 covers ADO; this chapter is solely concerned with the DAO model. It begins with a brief history of DAO and an indication of when it might be most appropriate to use DAO in preference to ADO. You'll see the new features in DAO before examining the three most important objects in the DAO object hierarchy: the DBEngine, Workspace
, and Database
objects. Then you'll explore database properties and how to use them.
Before you start working with DAO objects to access your data, you'll take an in-depth look at how to use DAO to create and modify your database structure, including tables, fields, indexes, and relations. Finally, you'll look at data access in detail using QueryDefs
and Recordsets
.
DATA ACCESS OBJECTS
DAO is ...
Get Microsoft® Access® 2010 Programmer's Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.