Link to home
Start Free TrialLog in
Avatar of Richard Comito
Richard ComitoFlag for United States of America

asked on

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.



Avatar of micaiah
micaiah

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.

Avatar of Richard Comito

ASKER

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?
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.
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.
ASKER CERTIFIED SOLUTION
Avatar of micaiah
micaiah

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No sweat.  At least now I know I am on the right track.  Thanks