Posted by: Weldo | November 12, 2009

The Access Object Model(DAO and ADO)

The code you write for Access forms, reports, and controls targets the Access object model, but to retrieve data you need to use a data access technology such as Data Access Objects (DAO), or ActiveX Data Objects (ADO). The requirement for using two object models creates an interesting dichotomy when you’re writing applications for Access, which also sets Access apart from writing code for other Office applications,we should seperate between the presentation layer and the data access layer when we create an application with linked tables.

The DAO Object Model:
Data Access Objects, or DAO, has long been used as the native data access technology for Access. Originally included in the Jet database engine with previous versions of Access, new features appear in DAO for use with Access 2007.

The ADO Object Model:
ActiveX Data Objects, or ADO, is another data access technology available to use with Access. Both technologies are acceptable and can be used in conjunction with one another, although it’s probably not necessary to do so. DAO, as the native application programming interface (API) for the Access database engine, has performance benefits over ADO. That said, ADO is more generic and thus has its own benefits. For example, ADO provides the ability to create Recordset objects that are not bound to a table or query, but rather are created at runtime by appending fields. In addition, you can use an ADO recordset as the data source for a form, combo box, or list box.

Advertisement

Responses

  1. Useful post Waleed (Y)
    I’ve a question:
    What’s Jet Database?

  2. Thank’s Zikas for you comment :) ,
    The database engine of Access called “JET”, and it has some disadvantages i think its not only disadvantages but also big problems:
    1. Don’t have Transaction logs
    2. Don’t have Triggers and Stored Procedures

  3. I’ve got it now! Thanks dude for answer


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.