Solved

Can I have ADODB and CDO in the same project?

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

821 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