Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here





I have a VB2010/.NET4 program using ADO to connect to a Jet database, both reading and writing to it.  It works just fine in the development environment, but when deploying on other machines it errors with the following:

************** Exception Text **************
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'ADODB.Connection'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00001550-0000-0010-8000-00AA006D2EA4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Is there some resource file which I should be including with the distribution?  

RE: ADODB.Connection

There are different things that could cause this error, and different fixes.

1) If you are accessing database fields like this:


change it to:


2) If you are setting up your ADODB.Connection like this:

        Dim cnn As ADODB.Connection
        cnn = CreateObject("ADODB.Connection")

change it to this:

        Dim cnn As ADODB.Connection
        cnn = New ADODB.Connection()

3) You might need to install the latest version of the Micorsoft Data Access Components (MDAC) to the target PC.

4) You might need to install the Microsoft Access Runtime (AccessRuntime.exe) to the target PC.

All that said, I highly recommend rewriting your application to use ADO .NET to connect to your database, not the old ADODB.  You'll avoid a lot of these problems that way.

I used to rock and roll every night and party every day.  Then it was every other day.  Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys!  Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!  

RE: ADODB.Connection

Thanks for your thoughts jebenson.  I am using the syntax you give for creating the connection, however I am now currently downloading the AccessRuntime and MDAC to see if that works on the deployment PCs.  The strange about this is that a few months back I distributed an application using ADODB and it runs perfectly all all machines.  If I now recompile it it errors!  I therefore think that there must be some change to my development environment causing the problem.  ANyway, thanks again and I'll let you know the outcome of your recommendations.

RE: ADODB.Connection

Installed the AccessRuntime on XP SP3 machine to test, with negative result.  Then tried installing MDAC, and it reports that all the MDAC functionality is contained within operating system. Completely stuck now!

RE: ADODB.Connection

Eventually I h have found the cause of the problem - the Windows 7 SP1.  See "http://support.microsoft.com/kb/2517589"
Once I followed the solution outlined in this article everything was resolved.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close