Solved

ADO, DAO, DataControl ??

Posted on 2000-05-04
6
362 Views
Last Modified: 2013-12-25
I'd like to know in simple terms what the difference is between ADO, DAO and DataControl is so I can get an idea which I should be using.  In addition to the explanation, some links would be helpful.

The application I'm attempting to code right now is pretty simple, but I'd like to build more complex ones in the future if I can ever get a handle on this data access thing.

I'm using VB5, and Access 97 (would prefer to use Access 2000 if I could get that to work with VB5 : )  

Thanks
0
Comment
Question by:Eyekissed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 2779117
DAO = old technology mostly for accessing Access database.

ADO = Latest data access technology that can use much any data source. Focus on that one since DAO will die.

DataControl: A control that use DAO to facilitate data access. Note that an equivalent control exists for ADO.

One of the best link concerning this is http://www.microsoft.com/data/
0
 
LVL 6

Expert Comment

by:Marine
ID: 2780318
If you going to use Access you will get better performance with DAO because Dao was optimized for Jet.
0
 
LVL 1

Expert Comment

by:billyh
ID: 2781068
DAO: this technique might be old, but is very good for developing LAN-based applications only. That means if you application is to be used in a WAN enviroment it is going to fail badly. Anyway Bill Gates has decided to drop DAO and move on with OLE-DB, which is implemeted through ADO.

ADO is very powerful and connects to different types of Databases, including Oracle. ADO works for both LANs and WANs pretty well. That to me is the only difference. Other than that they are both used to connect to databases.

As for datacontrols, there are two types, there is the DAO data control called DATA in VB, and the ADO data control called ADDODC. This are meant to reduce the level of coding.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:Sage020999
ID: 2781511
I currently use both technologies in my programming.  Both have there pluses and minues.  ADO is growing to be a powerful tool, but is still quite lacking when it comes to Access databases, including the new 2000.  Data controls are nice tools but are limited.  There are only a few areas where I would concider using these.  They work extremly well when bound to other controls like spread sheets.
0
 

Accepted Solution

by:
jwilson earned 50 total points
ID: 2782074
If you're just starting out, ADO should be pretty straight forward, but if you need to automatically recover from LAN/WAN connection failures, or the database has been moved, this redirection cannot be accomplished using ADO (as far as I know anyway).

ADO also has significant resource overhead compared to DAO as it is geared towards multiple heterogenious databases...

If you only have 1 database then DAO is by far simpler to use for professional redirection (i.e. zero down time).

I tried to implement a 7x24 system (time recording system for payroll) using ADO, but it failed miserably in this area - DAO on the other hand worked very well for this.

A minus to DAO is it's lack of report protoyping.

Similarly a minus to ADO is it's limited support for a true object model (supposed to be corrected in VB 7's ADO), i.e. enforcing bound controls. To prove this point try to write a function in one project with ADO that you can take with you to another...

To those who disagree,
1. Try to write a function to recover
   from a loss of connection, etc. for
   ADO (my last crack was over 30 lines
   of code and ultimately fails).

2. Then try it with DAO (this one's only
   8 lines of code - 3 years of 7x24).

This last comment is towards emoreau:
Microsoft has announced that DAO will no longer be improved, i.e. no major problems exist, so please use our latest, buggy, marketing scheme - I don't think this should be interpreted as "DAO will DIE"...
0
 
LVL 1

Expert Comment

by:billyh
ID: 2796216
I depends on how much you have given yourself to ADO.

From a hardcore DAO programmer like you and me(jwilson), ADO is completly unfair. Have you ever tried updating a recordset that you declared locally in your code that access an Access DB through SQL.

None-the-less just like in DAO, its just a matter of time until we are comfortable with ADO. I used to have the same problem with lost connections, but I know use re-setting the CONNECTION STRING of the ADO connection, to get back my connection. Yes ADO is very sensitive, but as a programmer, you learn how to work with the limitations.

So don't scare "Eyekissed" ADO is very fun and is more effiecient that DAO in some instances. To "jwilson" try connecting to a SQL server using DAO.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question