DAO OverviewThe DATA ACCESS MODEL is a set of DLLs that forms the core of the Jet Database Engine. DAO supports two different types of database environments. Using the Microsoft Jet Database Engine, DAO is optimized for accessing local Index Sequential Access Method (ISAM) databases such dBase, Paradox, Foxpro, and others. Using OBDCDirect, DAO is optimized for ODBC databases, with minimal overhead. The DAO user interface, which is developed using Visual Basic, contains all the necessary components for the user to interact with the database. The database Engine, which is provided by DAO, encompasses the mechanism needed to interact with the database. The database store is essentially the database repository, storing all the data that the application uses, in a form that the database engine can manipulate. The Database Store can be one of a variety of different database types. The Database Store can be located either locally or remotely when using DAO:
A true client/server database engine simply serves as a communication layer between the database and the application. The DAO Jet database engine is not a true client/server database engine. Each application that is developed using DAO Jet Database Engine requires a local copy of the DAO DLL files, to access the database, even if the application is running multiple client computers. However, you can create client/server applications using DAO by connecting to Open Database Connectivity (ODBC) database sources. Connecting to a DatabaseThe first step in developing your application by using DAO involves initializing your database engine and establishing connection to your database. Before you begin this first step, you need to understand how to use the three objects that form the foundation of DAO: DBEngine, Workspace, and Database.To use DAO in your Visual Basic application, your application must include the DAO Object Library. To add the Object Library for you application: 1. Open you Visual Basic project. Connections ObjectA Connections collection contains the current Connection object of a Workspace object. The Connections objects has one property Count, which returns the number of objects in a collection. The Connections object has one method, Refresh(), whose syntax is Refresh, with no parameters. This method updates the objects in a collection to reflect the current database's schema. Connection ObjectA Connection is a non-persistent object that represents a connection to a remote database. The Connection object is only available in ODBCDirect workspaces. Connection Object Properties
Connection Object Methods
Copyright� 2000 by Noel
|