Solved

ADO, DAO, DataControl ??

Posted on 2000-05-04
6
344 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 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

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…
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

773 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