Solved

Can I have ADODB and CDO in the same project?

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 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