By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,601 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,601 IT Pros & Developers. It's quick & easy.

Library References

P: n/a
A2000 SP-3. Win XP Pro.

I've inherited an A2k database which references both DAO and ADO
libraries. I'm a bit of a newbie with libraries and so-on so my question
is, can the two libraries be selected and co-exist in the same project?

The app certainly compiles OK and I don't think it would be a quick job
to convert to one library or the other. For info, if I de-select either
I get loads of compilation errors.

Many thanks.
Keith.
Nov 13 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a

"Keith" <ke***@NOCARPkeithwilby.org.uk> wrote in message
news:cj**********@hercules.btinternet.com...
A2000 SP-3. Win XP Pro.

I've inherited an A2k database which references both DAO and ADO
libraries. I'm a bit of a newbie with libraries and so-on so my question
is, can the two libraries be selected and co-exist in the same project?

The app certainly compiles OK and I don't think it would be a quick job
to convert to one library or the other. For info, if I de-select either
I get loads of compilation errors.

Many thanks.
Keith.


Yes, they can co-exist, not that I would recommend it. Sounds like a recipe
for mucho confusion. If both libraries are referenced, then where object
declarations could be ambiguous, they must be qualified e.g.

Dim rs As DAO.Recordset

In fact, for the sake of clarity, I always qualify declarations of all
DAO/ADO objects.
Nov 13 '05 #2

P: n/a
"Brian" <bc**@IHATESPAMclara.co.uk> wrote in message
news:10****************@damia.uk.clara.net...

"Keith" <ke***@NOCARPkeithwilby.org.uk> wrote in message
news:cj**********@hercules.btinternet.com...
A2000 SP-3. Win XP Pro.

I've inherited an A2k database which references both DAO and ADO
libraries. I'm a bit of a newbie with libraries and so-on so my question
is, can the two libraries be selected and co-exist in the same project?

The app certainly compiles OK and I don't think it would be a quick job
to convert to one library or the other. For info, if I de-select either
I get loads of compilation errors.

Many thanks.
Keith.
Yes, they can co-exist, not that I would recommend it. Sounds like a

recipe for mucho confusion. If both libraries are referenced, then where object
declarations could be ambiguous, they must be qualified e.g.

Dim rs As DAO.Recordset

In fact, for the sake of clarity, I always qualify declarations of all
DAO/ADO objects.


There's nothing wrong with having both references. I do it a lot: DAO for
queries against Access tables and ADO for queries against SQL Server.

I agree with your advice about always qualifying the declarations. I do this
even when I only have a DAO reference set.

For the record, the list of objects with the same names in the 2 models is
Connection, Error, Errors, Field, Fields, Parameter, Parameters, Property,
Properties and Recordset
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Nov 13 '05 #3

P: n/a
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:KY********************@rogers.com...

There's nothing wrong with having both references. I do it a lot: DAO for
queries against Access tables and ADO for queries against SQL Server.


Call me a Luddite if you will, but I almost exclusively use DAO against SQL
Server as well.
Nov 13 '05 #4

P: n/a
Brian wrote:
"Keith" <ke***@NOCARPkeithwilby.org.uk> wrote in message
news:cj**********@hercules.btinternet.com...
A2000 SP-3. Win XP Pro.

I've inherited an A2k database which references both DAO and ADO
libraries. I'm a bit of a newbie with libraries and so-on so my question
is, can the two libraries be selected and co-exist in the same project?

The app certainly compiles OK and I don't think it would be a quick job
to convert to one library or the other. For info, if I de-select either
I get loads of compilation errors.

Many thanks.
Keith.

Yes, they can co-exist, not that I would recommend it. Sounds like a recipe
for mucho confusion. If both libraries are referenced, then where object
declarations could be ambiguous, they must be qualified e.g.

Dim rs As DAO.Recordset

In fact, for the sake of clarity, I always qualify declarations of all
DAO/ADO objects.

Thanks Brian. I have been doing just that but I just wanted a little
extra confidence that what I was doing was right. Oh the joys of working
with someone else's stuff ;-)

Regards,
Keith.
Nov 13 '05 #5

P: n/a
Douglas J. Steele wrote:
<snip>
For the record, the list of objects with the same names in the 2 models is
Connection, Error, Errors, Field, Fields, Parameter, Parameters, Property,
Properties and Recordset

Thanks for the info. Is there special consideration to be observed when
handling the common objects?
Nov 13 '05 #6

P: n/a
"Keith" <ke***@NOCARPkeithwilby.org.uk> wrote in message
news:cj**********@hercules.btinternet.com...
Douglas J. Steele wrote:
<snip>
For the record, the list of objects with the same names in the 2 models is Connection, Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties and Recordset

Thanks for the info. Is there special consideration to be observed when
handling the common objects?


As long as you ensure you declare as DAO.xxx or ADODB.xxx, you should have
no problem.

If you don't disambiguate like that, you'll get which reference appears
higher in the list of references, which may not be what you want.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

Nov 13 '05 #7

P: n/a
Luddite
"Brian" <bc**@IHATESPAMclara.co.uk> wrote:

Call me a Luddite if you will, but I almost exclusively use DAO against SQL Server as well.

Nov 13 '05 #8

P: n/a
In Access, you almost have to use DAO for some things, and it's fine, even
excellent for working with either native JET tables, or links to servers. On
the other hand, I'm always coming up with compelling needs for ADO features
like batch optimistic recordsets, saving recordsets to files, and using
fabricated ADO recordsets for things that have nothing directly to do with
databases at all.

That means almost every Access project I work on has references to both DAO
and ADO. It's normal, and it's fine.

On Sat, 2 Oct 2004 11:27:22 +0000 (UTC), Keith <ke***@NOCARPkeithwilby.org.uk>
wrote:
A2000 SP-3. Win XP Pro.

I've inherited an A2k database which references both DAO and ADO
libraries. I'm a bit of a newbie with libraries and so-on so my question
is, can the two libraries be selected and co-exist in the same project?

The app certainly compiles OK and I don't think it would be a quick job
to convert to one library or the other. For info, if I de-select either
I get loads of compilation errors.

Many thanks.
Keith.


Nov 13 '05 #9

P: n/a
"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in message
news:ff********************@comcast.com...
Luddite
"Brian" <bc**@IHATESPAMclara.co.uk> wrote:

Call me a Luddite if you will, but I almost exclusively use DAO against

SQL
Server as well.



LOL!
Nov 13 '05 #10

P: n/a
Many thanks Steve.

Steve Jorgensen wrote:
In Access, you almost have to use DAO for some things, and it's fine, even
excellent for working with either native JET tables, or links to servers. On
the other hand, I'm always coming up with compelling needs for ADO features
like batch optimistic recordsets, saving recordsets to files, and using
fabricated ADO recordsets for things that have nothing directly to do with
databases at all.

That means almost every Access project I work on has references to both DAO
and ADO. It's normal, and it's fine.

On Sat, 2 Oct 2004 11:27:22 +0000 (UTC), Keith <ke***@NOCARPkeithwilby.org.uk>
wrote:

A2000 SP-3. Win XP Pro.

I've inherited an A2k database which references both DAO and ADO
libraries. I'm a bit of a newbie with libraries and so-on so my question
is, can the two libraries be selected and co-exist in the same project?

The app certainly compiles OK and I don't think it would be a quick job
to convert to one library or the other. For info, if I de-select either
I get loads of compilation errors.

Many thanks.
Keith.


Nov 13 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.