Accessing DAO

DAO is a component that supports Automation. Any licensed program that can call components that support Automation can access DAO functionality. Unlike regular dynamic-link libraries (DLLs) that expose calls but no details about them, components that support Automation contain a type library that describes every object, method, property, and so forth, in the DLL. Other components that support Automation, such as Microsoft Access, Visual Basic, Microsoft Excel, Microsoft Word, or Microsoft PowerPoint can read the DAO type library and make the appropriate calls to the DLL.

In DAO 3.5, there is a new client/server connection mode called ODBCDirect. You can use the ODBCDirect technology to establish a direct connection to an ODBC data source without having to load Microsoft Jet in memory. ODBCDirect is useful in situations where the specific features of ODBC are required. For more information about ODBCDirect see, Chapter 9, “Developing Client/Server Applications.”

Microsoft Access, which relies on Microsoft Jet for its database functionality, has calls to Microsoft Jet written into its internal code, and doesn’t call the DAO DLL except when Visual Basic code in a Microsoft Access database calls DAO. In other words, when you display a table through the Microsoft Access user interface, Microsoft Access calls Microsoft Jet directly through hard-coded routines. When you open a table by using Visual Basic code, Microsoft Access hands the request to the DAO component.