• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 756
  • Last Modified:

Can I have ADODB and CDO in the same project?

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
Richard Comito
Asked:
Richard Comito
  • 2
  • 2
1 Solution
 
grayeCommented:
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
 
Richard ComitoDirector of ITAuthor Commented:
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
 
grayeCommented:
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
 
Richard ComitoDirector of ITAuthor Commented:
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

Technology Partners: 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!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now