6.2. Why Use DAO?

Visual Basic programmers highly recommend ADO as their preferred object model for accessing databases. Although ADO is an excellent model with its own unique benefits, in the context of Access databases, it doesn't have the benefit of native database connectivity, which is where DAO has the distinct advantage.

Applications written in other programming languages, such as Visual Basic, Delphi, and the like, must explicitly connect to the data source they intend to manipulate, and they must do so every time they need to manipulate the data or underlying schema. This is because, unlike Access, these applications do not have an inherent connection to the data source. When used in Access, DAO allows you to manipulate data and schema through an implicit connection that Access maintains to whichever Jet, ODBC, or ISAM data source it happens to be connected to.

As linked tables are a uniquely Jet-specific feature, DAO is quite simply the better alternative for accessing Jet databases. In fact, it is impossible to do so natively using any other data access model.

DAO has evolved right alongside Jet, and has become the best model for accessing and manipulating Jet objects and structure. Because of its tight integration with Jet, DAO also provides much faster access to Jet databases than does ADO or JRO. This may all sound like marketing hype, but to qualify the advantages of DAO over other models, consider the following:

  • ADO connections can only be applied to one database ...

Get Access 2003 VBA 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.