How do I add Interop.ADODB?

I have written the following code.

        Dim iMail As CDO.Message
        Dim iConf As CDO.Configuration
        Dim iFlds As ADODB.Fields
        set iMail = New CDO.Message
        set iConf = New CDO.Configuration
        set iFlds = iConf.Fields

Everything is fine until I get to "set iFlds = iConf.Fields".  Then I get a "Reference required to assembly 'Interop.ADODB' containg the type 'ADODB.Fields'. Add one to your project"

I have a reference to ADODB and CDO already added to my sln.  I am not for sure what they want me to do.

Richard ComitoDirector of ITAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

micaiahConnect With a Mentor Commented:
Yeah, sorry - the CDOSYS library is way to go for exchange.
Are you referencing the COM version of adodb? Try referencing the .NET adodb dll. Or better yet, add a reference to System.Web.Mail and use a System.Web.Mail.MailMessage vs. CDO.

Richard ComitoDirector of ITAuthor Commented:
I was able to to get it to add the Interop.ADODB by adding the reference of Microsoft CDO for Windows 200 Library.  Instead of the Microsoft CDO 1.21 Library.

What is the difference between the CDO over the System.Web.Mail.MailMessage?
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

They actually use the same underlying system calls, IIRC, but with System.Web.Mail being a native part of the .NET framework, it's likely to be better supported than the CDO wrappers in coming days. Additionally, if you're already referencing the framework's System.Web dll for anything else, you'll save a little memory vs. loading another dll.
Richard ComitoDirector of ITAuthor Commented:
I am using CDO for the scalability of the object.  I am building a List Serv that will be relying and authenticating through an Exchange server.  From what I can see System.Web.mail does not have that same scalability. Am I just looking at the wrong info or would you suggest some other object?

Thanks for your help.
Richard ComitoDirector of ITAuthor Commented:
No sweat.  At least now I know I am on the right track.  Thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.