Solved

Can I have ADODB and CDO in the same project?

Posted on 2004-09-20
4
741 Views
Last Modified: 2008-02-01
I am working on a program that I am using ADODB to connect to my data base.

All is well until I add CDO to the mix.  Then I get an errro ('Connection'  is ambiguous in the namespace 'ADODB') with my ADODB object.

If I can have both in the project then what might cause the above error?

Thanks
0
Comment
Question by:GabicusC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 41

Accepted Solution

by:
graye earned 450 total points
ID: 12107479
That's rather odd, since CDO will add the ADODB component automatically (it's an internal requirement of CDO).

I *have* noticed that in Visual Studio .Net 2002 (the original version) that the ADODB component is just the "adodb.dll" file, whereas in the VS 2003 version, the ADODB component that gets added with CDO is "Interop.ADODB.dll".   That always peeked my interest, but never caused me any trouble (so I never persued it).

Here's what I'd do... delete both references to CDO and ADODB... then add CDO (so that it will automatically add the version of ADODB that it wants).  I'd bet that will solve the problem.
0
 

Author Comment

by:GabicusC
ID: 12107549
Sounds Great! I hope this is not to much of a dumb question but, how do I go about removing ADODB and CDO from the project?
0
 
LVL 41

Expert Comment

by:graye
ID: 12107577
From the "solutions explorer" (one of the many overlapping panels on the upper right of the IDE), expand the Reference section.  Right click on the stuff you want to go, and click on delete.
0
 

Author Comment

by:GabicusC
ID: 12112143
Well I tried to remove the references with no luck.  So I went ahead and upgraded .net 2003 and that seems to have fixed the problem.

Thank you for your help.  I would have never of figured that one out.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

732 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