The DAO model is a collection of object classes that model the structure of a
relational database system. They provide properties and methods that allow you
to accomplish all of the operations necessary to manage such a system, including
facilities for creating databases, defining tables, fields and indexes, establishing
relations between tables, navigating and querying the database, and so on.
The Jet database engine translates these operations on data access objects
into physical operations on the database files themselves, handling all the
mechanics of interfacing with the different supported databases.
Database programming in Visual Basic consists of creating data access
objects, such as Database, TableDef, Field, and Index objects, that correspond to
the various parts of the physical database you want to access. You use the
properties and methods of these objects to perform operations on the database.
You can display the results of these operations and accept input from the user on
Visual Basic forms, using both bound and unbound controls.
This approach simplifies the code you need to write and insulates you from
the underlying structure and mechanics of retrieving and updating data. It gives
you great flexibility, because you can use the same objects, properties, and
methods to work with a wide variety of supported database formats. Also, if you
change from one database format to another (for example, porting a local
Microsoft Access database to a SQL Server database on a network), you'll need
to make few changes in your code to accommodate the change. You can even
create applications that join tables from two or more different databases in a
single query or report.
No comments:
Post a Comment