How do I add Interop.ADODB?

Posted on 2004-09-21
Last Modified: 2012-06-27
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.

Question by:GabicusC
  • 3
  • 3

Expert Comment

ID: 12118153
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.


Author Comment

ID: 12118239
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?

Expert Comment

ID: 12118263
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.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.


Author Comment

ID: 12119338
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.

Accepted Solution

micaiah earned 500 total points
ID: 12119646
Yeah, sorry - the CDOSYS library is way to go for exchange.

Author Comment

ID: 12119963
No sweat.  At least now I know I am on the right track.  Thanks

Featured Post

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Run a batch file when a Crystal Report is opened 5 50
Complex SQL statement in VB.NET 7 31
Code enhancement 4 22
Access/Visual Basic Question 3 26
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String ( Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below.…

828 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