DAO / ADO how do I know which I'm using

G

Guest

After much reading about the differences and preferences to each of the
methods I'm still apparently missing the point. How do I know which method
I'm currently using in my database. Or perhaps both? My database was an
Access97 db converted to Access2002, now making changes to the same db that
was updated to Access2007 database. Database was converted to Access2007
format and saved as .accdb.

Is this (.accdb) the key that tells me I'm using DAO?

I know this should be simple and self-explanatory but here I sit.

I've checked the references in the database and neither the DAO or ADO items
are checked. When I try to add the DAO 3.6 reference I'm not allowed as
Access2007 indicates that it's not correct for the type of db I've got open.

Thanks,
Robin
 
G

Guest

The file extension .accdb only indicates that it is an Access 2007 file type.
ADO an DAO refer to objects that are used to manipulate data within the
database. Access 2007 should be able to use both I believe. Why do you need
to know? Are you having some problem with your database? If so, I'm sure
someone here could help to resolve it but we need to know what the problem is
first.
 
G

Guest

My problem is I am using a third party printer function that has two sets of
code available, DAO or ADO. In the previous versions I was using the DAO
code. After the database was converted to Access 2007 the code failed. I
inquired about purchasing new code compatible with Access 2007 and Windows
Vista Ultimate. I received an update of the previous version and their
assurances that it works with Access 2007 and Vista. Both requirements that
I need. I have exchanged the new DAO code in place. The print features work
fine in Access 2007 on XP machines but fails on Vista Ultimate Machine.

I can't remember when I converted the database to 2007 whether I selected
ADO or DAO, or even if that was a choice I was provided. I know I was
considering the ADO as I believe it offered features I was planning to add,
all a little muddy right now.

So I'm trying to determine which type of code I should be using. Basically,
this will allow me to determine if I am causing the problem by using the
wrong code or where to look next for a solution. It's difficult to continue
building the application when I can't test the features.

By the way the failure shuts down Access in it's tracks and I have to wait
for the checking solutions, trying to repair and restart Access each time the
code fails.

Hence my plea to the Group.

Thank you,
Robin
 
B

bsmith59

After much reading about the differences and preferences to each of the
methods I'm still apparently missing the point. How do I know which method
I'm currently using in my database. Or perhaps both? My database was an
Access97 db converted to Access2002, now making changes to the same db that
was updated to Access2007 database. Database was converted to Access2007
format and saved as .accdb.

Is this (.accdb) the key that tells me I'm using DAO?

I know this should be simple and self-explanatory but here I sit.

I've checked the references in the database and neither the DAO or ADO items
are checked. When I try to add the DAO 3.6 reference I'm not allowed as
Access2007 indicates that it's not correct for the type of db I've got open.

Thanks,
Robin

Robin,

When you create a new recordset, what does your "set" statement look
like? And are you able to run/compile your application without the
DAO 3.x reference? If so, you more than likely are using ADO.
Hopefully someone with more Access 2007 can validate, as I haven't
made the leap to that version yet.

Cheers,
Brandon Smith-Daigle
http://accesspro.blogspot.com
 
T

Tony Toews [MVP]

Robin said:
After much reading about the differences and preferences to each of the
methods I'm still apparently missing the point. How do I know which method
I'm currently using in my database. Or perhaps both?

By your references. And if both are present in your references then
whichever one is first. But then you want to disambiguate the DAO vs
ADO comments which are present in both.

Ctrl+G will take you into the Debug/Immediate window. Then click on
Tools on the menu bar and References.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
C

Chris2

Robin said:
My problem is I am using a third party printer function that has two sets of
code available, DAO or ADO. In the previous versions I was using the DAO
code. After the database was converted to Access 2007 the code failed.

Robin,

Did you check your references in Access 2007 to see if the DAO object library was checked?


Sincerely,

Chris O.
 
G

Guest

I have checked the references and there are only four checked:

Visual Basic for Applications
Microsoft Access 12.0 Object Library
Microsoft Office 12.0 Access Database Engine Library
Microsoft Visual Basic for Applications Extensibility 5.3

None of the ADO or DAO items are checked. And when I try to activate them
Access 2007 just alerts me that these are not the right type of Library's and
closes the References selection options, with my items unselected.

My current assumption is that I am using DAO as the code that the vendor
supplied came in two forms DAO and ADO. And since I was using DAO before and
the code that calls the function appears to be DAO.

My vendor has responded that I could comment out a couple of unnecessary
items and my printing problem has been solved by that action.

My concern is that if it is possible to have used DAO in A2002 and to have
converted to A2007 and specified some ADO reference during the conversion am
I creating problems that will pop up later.

Is it possible that the four references listed initially provide all the
Library's that I need for my previously DAO coded database and no additional
items are needed? I've worried about nothing before.

Everything I've done over the last 7 years seems to be working fine at this
point I'm just frustrated that I can't understand what is happening. I've
heard it pointed out to someone before, but "maybe I'm just not capable of
understanding" this concept.

Thank you,
Robin
 
T

Tony Toews [MVP]

Robin said:
I have checked the references and there are only four checked:

Visual Basic for Applications
Microsoft Access 12.0 Object Library
Microsoft Office 12.0 Access Database Engine Library
Microsoft Visual Basic for Applications Extensibility 5.3

My apologies. I was thinking in terms of A2000 to A2003 databases.
I'll have to do some digging up on how A2007 handles all this but that
won't happen for a day or two. I haven't played around a lot with
A2007.
None of the ADO or DAO items are checked. And when I try to activate them
Access 2007 just alerts me that these are not the right type of Library's and
closes the References selection options, with my items unselected.

That would make sense.

Hopefully someone else will jump in here.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
D

Douglas J. Steele

AFAIK, Microsoft Office 12.0 Access Database Engine Library is the Access
2007 version of DAO.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)
 
G

Guest

Thank you very much, it makes sense that everything is still going along
nicely. I'll actually sleep better now, thanks again.
Robin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Access 2007 + SQL Server 7
DAO vs. ADO 3
DAO vs ADO 5
DAO v ADO 5
ADO? DAO? help with these two please 3
DAO IS DED 16
Convert from DAO to ADO 7
Can't open new Access DB accdb from my code 6

Top