Solved

ADO, DAO, DataControl ??

Posted on 2000-05-04
6
332 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
6 Comments
 
LVL 69

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

919 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now