Solved

Can I have ADODB and CDO in the same project?

Posted on 2004-09-20
4
722 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
  • 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

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

17 Experts available now in Live!

Get 1:1 Help Now