none
adodb.connection error 0x80004002

    Question

  • Just got this error in my vb2008 programs when trying to install on other computers (customers running XP and Vista).  I am on a Win7 computer and are using MS Access 2007 databases. Up to now everything was just perfect - but now....

    Tried to search the net for solutions, but got a lot of mumbo-jumbo I can not understand. Can somebody please give me an idea of what to do in order to supply a set-up program which works.

    Kind regards
    Jorgen




    Tuesday, May 24, 2011 7:16 PM

Answers

  • As far as I understand your post; there is a program that written in VB.Net2008, and an error occuring when you try to run a program on another computer. Is my understand correct?
    If so, it must be exist a code like below:

    Dim cnn As ADODB.Connection
    Dim cnnType As Type
    cnn = CreateObject("ADODB.Connection")
    ' or
    cnnType = Type.GetTypeFromCLSID(New Guid("00001550-0000-0010-8000-00AA006D2EA4"))
    cnn = Activator.CreateInstance(cnnType)
    

    If you have, you should install "Microsoft Data Access Components (MDAC)" to the target computer.

    Also, you should use like below instead:

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

    Make everything as simple as possible, but not simpler.
    • Marked as answer by levesen Friday, May 27, 2011 1:20 PM
    Wednesday, May 25, 2011 11:49 PM

All replies

  • If MS-Access use is not mandatory, use the SQLite. Otherwise you must be patient for unexpected errors :)
    Make everything as simple as possible, but not simpler.
    Tuesday, May 24, 2011 11:24 PM
  • Yes, that is the next major step - but for the time beeing I have to use the MS Access because of all the programs I have. So for the next half year I have to live with MS Access connections.

    I am looking for a solution to my VB2008 set-up problem, I cannot modify my customers computers in order to get the installation to work. 


    levesen
    Wednesday, May 25, 2011 8:37 AM
  • Can you provide more details about the exception? The information provided by yours is looks like not enough for a solution.
    Make everything as simple as possible, but not simpler.
    Wednesday, May 25, 2011 11:19 AM
  • The error message:

    Unable to cast COM object of type ADODB.Connection Class. This operation failed because the QueryInterface call on COM component for the interfacewith IID(00001550-0000-0010-8000-00AA006D2EA4) failed due to the following error: No such intefrace supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."


    levesen
    Wednesday, May 25, 2011 1:09 PM
  • As far as I understand your post; there is a program that written in VB.Net2008, and an error occuring when you try to run a program on another computer. Is my understand correct?
    If so, it must be exist a code like below:

    Dim cnn As ADODB.Connection
    Dim cnnType As Type
    cnn = CreateObject("ADODB.Connection")
    ' or
    cnnType = Type.GetTypeFromCLSID(New Guid("00001550-0000-0010-8000-00AA006D2EA4"))
    cnn = Activator.CreateInstance(cnnType)
    

    If you have, you should install "Microsoft Data Access Components (MDAC)" to the target computer.

    Also, you should use like below instead:

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

    Make everything as simple as possible, but not simpler.
    • Marked as answer by levesen Friday, May 27, 2011 1:20 PM
    Wednesday, May 25, 2011 11:49 PM
  • Hi,

    I have Windows 7 , VS2010.

    I created program VB2010 for XP users to access data from Access 2007 using ADODB.Connection.

    As above said it worked fine until i had Service Pack1. When published again after SP1 user getting same error. 

    Your code above did not work for me.

    Please help with...

    Thanks.

     

    Thursday, June 23, 2011 7:26 PM
  • Hi there,

    I had to force my clients to install the "AccessRuntime.exe" (you can get it for free from Microsoft). If I catch the error number 3706 when opening the main form, I install the Access Runtime(which I have included in the Set-Up files). So far everything has worked out perfectly.

    Kind regards

    Jorgen


    levesen
    • Marked as answer by levesen Thursday, June 23, 2011 9:50 PM
    • Unmarked as answer by levesen Thursday, June 23, 2011 9:50 PM
    Thursday, June 23, 2011 9:49 PM
  • Hi,

    User has full version of Access 2007 on their pc.

    Also how to add runtime version of access (along with setup files)? Can i down load from web?

    I have access 2010 on my machine. I created 2007 db from remote machine.

    Thank you so much for help.

    Sudha

    Friday, June 24, 2011 3:44 PM
  • This is my way of installing the MS runtime, the following is added to the form_Load event:

    Try

    .........

    Catch

    Beep()

    MsgBox(Err.Description, MsgBoxStyle.Critical, "Load Form")

    If Err.Number = 3706 Then

    Dim p As New System.Diagnostics.Process

    p.StartInfo.FileName = m_Path & "\AccessRuntime.exe"

    p.Start()

    MsgBox("Will install the Access Runtime in order to rectify the problem" & vbCrLf & "Try to run the program again after the installation!", MsgBoxStyle.Information, "Error solving")

    End If

    End Try

    The access runtime is included in the set-up files, and can be downloaded free of charge from microsoft.

    Regards

    Jorgen


    levesen
    Saturday, June 25, 2011 1:55 PM
  • i installed AccessRuntime 2007 C:\AccessRuntime\

    User still get the same error

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

     

    User has full versiof of Access 2007. Program is in VB2010. Installed runtime (2007) also.

    User operating system: XP V2002 SP3

    I am using 'Publish' to creat setup files. Create setup files on network and use Setup.exe to install.

    Monday, June 27, 2011 4:09 PM