Solved

Looking for Opinion: DAO and ADO - tabledef

Posted on 2009-04-06
40
575 Views
Last Modified: 2012-06-27
Hi EE,
I used to work with A2000 and used DAO bec. that is what I understood.

I am slowly mvong towards ADO.
I was wondering:
a) do you ever venture to DAO.
     For ex: I notice that DAO has a tabledef property.
                 Cannot find tabledef for ADO in Object Browser.

b) Does ADO have tabledef or something similar?
tx, sandra
0
Comment
Question by:mytfein
  • 13
  • 9
  • 6
  • +3
40 Comments
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 100 total points
ID: 24080074
Just a note that DAO is optimized to work with Access MDB's and ADO for non-Access MDB's.

mx
0
 
LVL 28

Assisted Solution

by:TextReport
TextReport earned 50 total points
ID: 24080090
Hi Sandra, I still use DAO for may of the TableDef, QuerysDef types of stuff as I have yet found an ADO solution for these but like you I wouldn't mind seeing what others do.
Cheers, Andrew
0
 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 75 total points
ID: 24080202
For Access DB's with JET based tables, I use DAO all the time.  I only use ADO if I'm dealing with some other database engine, like SQL Server.
JimD.
0
 
LVL 75

Assisted Solution

by:DatabaseMX (Joe Anderson - Access MVP)
DatabaseMX (Joe Anderson - Access MVP) earned 100 total points
ID: 24080221
"a) do you ever venture to DAO."
Always.

"b) Does ADO have tabledef"
This is no TableDef object in ADO.   Not sure what the equivalent (if any) is ... other than the Connection object and Recordset object.

mx
0
 
LVL 65

Assisted Solution

by:rockiroads
rockiroads earned 175 total points
ID: 24080286
The equivalent in ADO is to use ADOX. It is also restricted in that you cant change certain properties like type, which I think you can with DAO.

But agree with mx here, DAO is simple to use. I use ADO to talk to databases that I need to connect to using ODBC. In Excel, connecting to a Access DB or in vb.net, I use ADO (or ado.net)
0
 
LVL 75
ID: 24080318
So Rocki ... how do you get ADOX to show up in the Object Browser - or well, what is the deal?

mx
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 175 total points
ID: 24080465
The reference for this is ADO Ext <versionnumber> for DDL and Security (well thats what mine says). The dll is c:\program files\common files\system\ado\msADOX.dll


example usage. You have to create a ADO Connection
then can use the ADOX objects

    Dim conn As adodb.Connection
    Dim tbl As New ADOX.Table
    Dim col As New ADOX.Column
    Dim cat As New ADOX.Catalog
   
    Set conn = CurrentProject.Connection
   
    Set cat.ActiveConnection = conn

'Closest to tabledef
    Set tbl = cat.Tables("tblChk")

'And fields of table
    Set col = tbl.Columns("Txt")
0
 
LVL 44

Assisted Solution

by:Leigh Purvis
Leigh Purvis earned 100 total points
ID: 24082059
To be fair, though DAO is generally better optimised for JET/ACE, ADO does have some built in abilities that DAO doesn't.
So it's not always down purely to performance (which is usually very similar anyway).
ADOX can, of course, also be late bound - and so doesn't always need to be included as a reference but created as and when.
Though cited for security and user functionality it's often avoided in that capacity as it isn't the whole deal really.  (Were you working with SQL Server logins for example - you'd be better off having dedicated Server procedures to handle that, and they can be executed through ADO alone).
There are things you can do through ADOX (the example which springs to ming is to reseed an autonumber on a column which has a constraint/relationship upon it) which won't work by other means.
In live work I employ both DAO and ADO a great deal - but ADOX to a limited extent only.
I'd feel limited choosing just one - and I see no reason to do so.  (So if you're "slowly mvong towards ADO" is it for a valid reason?)
0
 

Author Comment

by:mytfein
ID: 24082401
Hi guys,

thx for replying and joining this conversation.

comments:
=========

a) I thought that Microsoft was no longer supporting DAO (I could be wrong on that...)

b) I thought that VB.NET uses ADO (I could be wrong on that), and if I want to one day expand skills
to VB.NET, using ADO in Access might be good practice.

c) I recently heard that in Excel one connects to a datasource using ADO, so while I enjoy more working
Access to Excel direction than directly in Excel VBA, thought that practicing ADO in Access would
be useful.

I have more questions based on this conversation, so will open another post.
thx, s
0
 

Author Comment

by:mytfein
ID: 24082483
Thx again guys, wanted to credit particpants, sorry for the smaller allocations...

tx again, s
0
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 24082598
a) Nooo.  That's way old info.  The drawback of the digital interweb thingy is that old info still sits out there proudly mis-informing.
ADO's development cycle ended several years ago.  DAO (thanks to ACE in Office 12) is again under development (though really only to support new database engine functionality thus far).
That doesn't mean that either isn't very useful.
b) Nope.  That's ADO.NET which really has nothing in common.  The naming was more marketing than anything.
c) Yes - I'd go along with that one actually.
0
 
LVL 75
ID: 24083237
"a) I thought that Microsoft was no longer supporting DAO (I could be wrong on that...)"

And even if that were true - and it's not - it would only mean that no new features would be added to DAO.  It's not like it would suddenly go away ... disappear from existing Office installations, etc.  

Long Live DAO.

mx
0
 

Author Comment

by:mytfein
ID: 24083271
thx mx, s
0
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 24083273
Long live DAO and ADO in tandem!  

Until a radical change happens (and we're all thinking Office.NET there of course) I can't see either being dropped.  (Not without an almighty ruckus!)
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24084255
Office.Net, do you think that will ever happen. I cant imagine Office being dependant on the .net framework but you never know with microsoft.

Sandra, Ive used ADOX but only for table manipulation and not inside Access as its simpler/easier to use DAO for this.
0
 

Author Comment

by:mytfein
ID: 24088427
Thx guys,

you are a wonderful sounding board!

tx, s
0
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 24088786
Hi Rock.   Just to be clear that this is just an opinion formed some time ago, not based on advance knowledge one way or the other... :-)
I'm not convinced that "Office.NET" as a single concept will happen in itself.  To my mind that would be too big a leap.  There are too many applications all over the world that depend entirely upon VBA.  So any future versions would have to be incremental introducing .NET support directly (other than VSTO) and maintaing VBA compatability at least.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24088937
Yes I know its just thoughts at the moment, you never know what ms is up to though, maybe a intermediate way of using both. vba.net with added dao.net, lol
0
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 24089676
lol DAO.NET
That would be something.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 65

Expert Comment

by:rockiroads
ID: 24089807
there is as much chance of that happening as England winning a test match. Absolutely poor in the windies. Only won the one dayers due to a windies cockup on the d/l calculation. Gonna get hammered by the aussies. Good thing flavo isnt around. Leigh, is he still around? I havent seen him here, mind you Ive only recently become this active on EE.
0
 
LVL 44

Expert Comment

by:Leigh Purvis
ID: 24090044
Dave's around even more rarely than I - and that's saying something.
That said, I coincided with him in a thread here only yesterday.  (First in a long, long time).
Still, going in with low hopes and then doing badly.  That's called living up to your expectations. ;-)
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24090072
I'll try to chase him up, see how he is doing. Gotta watch the footy first thats coming on later
0
 
LVL 28

Expert Comment

by:TextReport
ID: 24090105
rocki, that will be the big one of the day Darlington (where I am originally from) vs Wycombe (nearest team to where I live. Much bigger game then Man U or Arsenal
Cheers, Andrew
0
 
LVL 75
ID: 24090285
DAO.Net ... I LIKE it !!!

"Darlington"
Yes ... I love NASCAR !!!

mx
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24090321
lol Andrew. Darlington got it tough today as they are without 3 of their first team players. Ive only ever seen one League 2 game, it was the old division 4, Preston vs Torquay, Max attendance of 12k or something with a massive pitch invasion cos Preston got promoted. Great atmosphere but the game was comparable to Sunday league, lol. Nowadays I follow the championship, thats where my team (midlands) is.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24090334
Spot the American lol :)
0
 
LVL 28

Expert Comment

by:TextReport
ID: 24090475
rocki, I suppose as you didn't say if you were happy or sad yesterday you must be from the east midlands?
Cheers, Andrew
0
 
LVL 28

Expert Comment

by:TextReport
ID: 24090503
mx can't beleive Darlington SC is so small a population in 2000 of 6,720
Cheers, Andrew
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24090530
nope west midlands, but gotta hide my identity :) Middle of the table say no more!!!

0
 
LVL 28

Expert Comment

by:TextReport
ID: 24090612
OK might run into you next time I am sent.
Best wishes, Andrew
0
 
LVL 75
ID: 24090631
"mx can't beleive Darlington SC is so small a population"
Only when NASCAR is *not* there ...

mx
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24090693
give me a shout, krony 1664 is the official beer of ee :)

mx, how come there is no F1 in the states, instead you go that merry go round called nascar ;)
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24090698
as in, give me a shout when your next up in the midlands! doh!
0
 
LVL 75
ID: 24090720
Round and round ... at 200 mph.  Once you've seen a live NASCAR race ... you 'get it'.  Hard to perceive on TV.  However, we do have NASCAR 'F1' (road races) about 3x/year, ... lol.

F1 .... rocks !!!
0
 
LVL 75
ID: 24090727
They have talked about bring F1 to Indy ... but ?????
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24090774
they used to race F1 in the states, not sure what happened. F1 is real interesting this season. Brawn and Button, amazing start. and F1 governing body after McLaren again!
0
 
LVL 28

Expert Comment

by:TextReport
ID: 24090794
F1 was at the brickyard for a couple of years but someone pulled it.
0
 
LVL 75
ID: 24090821
yes, but in the end ... I'll bet it's Hamilton !
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 24090942
Hello Jim, not often I see you with your admin hat on. But reminder noted.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

707 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

14 Experts available now in Live!

Get 1:1 Help Now