Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. "class does not support automation..." error

"class does not support automation..." error

Scheduled Pinned Locked Moved Visual Basic
helptestingtoolsquestion
13 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N ns

    runtime error "class does not support..." "Class does not support automation or does not support expected interface" I've double checked that the correct dll is being referenced, so thats not the problem, plus it works fine on my machine. On a win98 and a win2k that I've tried so far I get the above error. Any ideas? I installed the dll with PDW so all files should be present on the users machines..... Thanks, ns

    N Offline
    N Offline
    Nick Parker
    wrote on last edited by
    #2

    hmmm.... Is the .dll registered, that is different than just being present. If not try this at the command prompt:

    C:\[location of .dll]\ regsvr32 myComponent.dll

    Nick Parker
    **The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown


    **

    N 1 Reply Last reply
    0
    • N Nick Parker

      hmmm.... Is the .dll registered, that is different than just being present. If not try this at the command prompt:

      C:\[location of .dll]\ regsvr32 myComponent.dll

      Nick Parker
      **The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown


      **

      N Offline
      N Offline
      ns
      wrote on last edited by
      #3

      It is registered because I'm building it on my machine locally... Thanks, ns

      1 Reply Last reply
      0
      • N ns

        runtime error "class does not support..." "Class does not support automation or does not support expected interface" I've double checked that the correct dll is being referenced, so thats not the problem, plus it works fine on my machine. On a win98 and a win2k that I've tried so far I get the above error. Any ideas? I installed the dll with PDW so all files should be present on the users machines..... Thanks, ns

        P Offline
        P Offline
        Paul Riley
        wrote on last edited by
        #4

        ns wrote: "Class does not support automation or does not support expected interface" Bizarrely, this usually means that the build version of the DLL is different from the build version expected by the program. If you have a test program for a DLL that you've rebuilt, you need to rebuild the program too. Paul

        N 1 Reply Last reply
        0
        • P Paul Riley

          ns wrote: "Class does not support automation or does not support expected interface" Bizarrely, this usually means that the build version of the DLL is different from the build version expected by the program. If you have a test program for a DLL that you've rebuilt, you need to rebuild the program too. Paul

          N Offline
          N Offline
          ns
          wrote on last edited by
          #5

          Really I am rebuilding each time, and I know its connnected to the new dll because I'll put in identifying msgboxes in the new dll. But thanks for the answer.... Thanks, ns

          P N 2 Replies Last reply
          0
          • N ns

            Really I am rebuilding each time, and I know its connnected to the new dll because I'll put in identifying msgboxes in the new dll. But thanks for the answer.... Thanks, ns

            P Offline
            P Offline
            Paul Riley
            wrote on last edited by
            #6

            No problem. I still think you'll find it's something along these lines. I had a bizarre fault once with an InstallShield Automation DLL. I wrote a couple of programs using v7.0.1. When I upgraded to v7.0.2, the austomation programs stopped working; the two DLLs were byte-for-byte identical except for the version number. I tried rebuilding with no luck. Eventually, I switched the DLL back to v7.0.1 and everything worked fine. When I later upgraded to 7.0.3, the programs rebuilt and worked fine. Go figure. Paul

            N 1 Reply Last reply
            0
            • P Paul Riley

              No problem. I still think you'll find it's something along these lines. I had a bizarre fault once with an InstallShield Automation DLL. I wrote a couple of programs using v7.0.1. When I upgraded to v7.0.2, the austomation programs stopped working; the two DLLs were byte-for-byte identical except for the version number. I tried rebuilding with no luck. Eventually, I switched the DLL back to v7.0.1 and everything worked fine. When I later upgraded to 7.0.3, the programs rebuilt and worked fine. Go figure. Paul

              N Offline
              N Offline
              ns
              wrote on last edited by
              #7

              This is a dll that I wrote though. It gets into the dll, executes one step of the loop, then the error pops up. I have a progress bar in the calling app thats getting updated bythe dll, so thats why I know its gone one step...because the bar has one little block in it... Thanks, ns

              P 1 Reply Last reply
              0
              • N ns

                This is a dll that I wrote though. It gets into the dll, executes one step of the loop, then the error pops up. I have a progress bar in the calling app thats getting updated bythe dll, so thats why I know its gone one step...because the bar has one little block in it... Thanks, ns

                P Offline
                P Offline
                Paul Riley
                wrote on last edited by
                #8

                Very bizarre. Sorry, you're out of my depth:~ Paul

                N 1 Reply Last reply
                0
                • N ns

                  Really I am rebuilding each time, and I know its connnected to the new dll because I'll put in identifying msgboxes in the new dll. But thanks for the answer.... Thanks, ns

                  N Offline
                  N Offline
                  ns
                  wrote on last edited by
                  #9
                        Dim Conn1 As New ADODB.Connection
                       Dim Cmd1 As New ADODB.Command
                       ' Dim Errs1 As Errors
                       Dim Rs1 As New ADODB.Recordset
                       Dim adoField As ADODB.Field
                      MsgBox "in pop"
                      AccessConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + dataBaseName
                  
                      Conn1.ConnectionString = AccessConnect
                      Conn1.Open
                      MsgBox 1                                                 'fires
                      Cmd1.ActiveConnection = Conn1
                      MsgBox 2                                                 'doesnt fire
                      Cmd1.CommandText = "SELECT * FROM tblTest"
                  

                  I packaged the dll with PDW so I dont know whats missing.... My references are ado 2.7 library, and MMS extension 2.7 for dds and security. These went along in the cab I think (I saw the adox in PDW list) Thanks, ns

                  P 1 Reply Last reply
                  0
                  • P Paul Riley

                    Very bizarre. Sorry, you're out of my depth:~ Paul

                    N Offline
                    N Offline
                    ns
                    wrote on last edited by
                    #10

                    see my latest post --maybe it'll be clear to you exactly whats happening...:) Thanks, ns

                    1 Reply Last reply
                    0
                    • N ns
                            Dim Conn1 As New ADODB.Connection
                           Dim Cmd1 As New ADODB.Command
                           ' Dim Errs1 As Errors
                           Dim Rs1 As New ADODB.Recordset
                           Dim adoField As ADODB.Field
                          MsgBox "in pop"
                          AccessConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + dataBaseName
                      
                          Conn1.ConnectionString = AccessConnect
                          Conn1.Open
                          MsgBox 1                                                 'fires
                          Cmd1.ActiveConnection = Conn1
                          MsgBox 2                                                 'doesnt fire
                          Cmd1.CommandText = "SELECT * FROM tblTest"
                      

                      I packaged the dll with PDW so I dont know whats missing.... My references are ado 2.7 library, and MMS extension 2.7 for dds and security. These went along in the cab I think (I saw the adox in PDW list) Thanks, ns

                      P Offline
                      P Offline
                      Paul Riley
                      wrote on last edited by
                      #11

                      No idea. I would have done this differently:

                      Dim Cmd1 As New ADODB.Command
                      AccessConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + dataBaseName
                      Cmd1.ActiveConnection = AccessConnect
                      Cmd1.CommandText = "SELECT * FROM tblTest"
                      ' blah blah blah
                      Set Cmd1.ActiveConnection = Nothing
                      

                      purely because I'm lazy and this does all the work (opening connections) for you. However, as far as I can see, you should be able to do it that way. Here's a strange idea... have you tried **Set** Conn1.ConnectionString = AccessConnect ? Paul

                      N 1 Reply Last reply
                      0
                      • P Paul Riley

                        No idea. I would have done this differently:

                        Dim Cmd1 As New ADODB.Command
                        AccessConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + dataBaseName
                        Cmd1.ActiveConnection = AccessConnect
                        Cmd1.CommandText = "SELECT * FROM tblTest"
                        ' blah blah blah
                        Set Cmd1.ActiveConnection = Nothing
                        

                        purely because I'm lazy and this does all the work (opening connections) for you. However, as far as I can see, you should be able to do it that way. Here's a strange idea... have you tried **Set** Conn1.ConnectionString = AccessConnect ? Paul

                        N Offline
                        N Offline
                        ns
                        wrote on last edited by
                        #12

                        I had referenced the ado 2.7 library . My target had 2.5 on it. PDW didnt update the mdac on the target. So, I built the dll with the 2.5 ADO library instead and it works. Only problem is that PDW while installing the dll told me there was an error registering msado25.tlb, which is use by other parts of my program so I have to check and see if they work... Thanks so much for your input. Thanks, ns

                        P 1 Reply Last reply
                        0
                        • N ns

                          I had referenced the ado 2.7 library . My target had 2.5 on it. PDW didnt update the mdac on the target. So, I built the dll with the 2.5 ADO library instead and it works. Only problem is that PDW while installing the dll told me there was an error registering msado25.tlb, which is use by other parts of my program so I have to check and see if they work... Thanks so much for your input. Thanks, ns

                          P Offline
                          P Offline
                          Paul Riley
                          wrote on last edited by
                          #13

                          HA! Told you it was DLL versioning ;P Seriously though, I can see why that was confusing. I'd have expected it to fall on the Connection object. Glad you got there. Paul

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups