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 not registered

Class not registered

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasehelpmysql
6 Posts 2 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.
  • R Offline
    R Offline
    RossouwDB
    wrote on last edited by
    #1

    Good day, I know there are numerous questions about the HRESULT 0x80040154 (REGDB_E_CLASSNOTREG) error, and I have seen all (maybe most) of the solutions, but none of those are of any help, I donwloaded all the possible apps that have been suggested but none of those work. I am using Visual Basic 2005, XP and Office 2003 ( I prefer to use this combination), I am also using the following dll's: - Interop.Word - Interop.Excel - Interop.Outlook - MySql.Data - All default dll's The program I have designed works perfect on my computer, but when I install it on another pc, I get this error. The other pc's have .net framework 2.0 on them, which is required for the installer to work. Ok, now where the error occurs - I am only giving two places of occurence, but it occurs throughout the program: A) As an example, there are two forms, frmMain and frmSecond, and frmMain has a button with the following code : frmSecond.Enabled = true frmSecond.Visible = true When I click the button, the error occurs at the first instance where the form object is referenced, in this case, it will be at frmSecond.Enabled = true, if this line is commented out will occur at frmSecond.Visible = true, etc. At first I thought it is because of my global variables being created as other forms or classes, so I made those local variables, local to the method using them, but that wasn't the case. B) As another example, there is one form, frmMain, and a class, clsSomeClass, and frmMain has a button with the following code : dim clsSomeClassRef as new clsSomeClassRef clsSomeClassRef.method(parameter(s)) for simplicity, the clsSomeClass manipulates a SQL database, for this example, lets say it creates as new entry in the database. When the button is clicked, the error will pop up at clsSomeClassRef.method(parameter(s)), and the class only has the MySql.data dll. I am at a complete loss of reasons, my first thought of why this is happening, is because VB is platform dependent, so I have to/must redo the program in C#, which is not platform dependent, but I first want to make sure that C# won't produce the same error, as it is a lot of work and code to redo. I you guys could help me with this error, I would be highly grateful and thankful and your efforts would be much appreciated!! It is kinda urgent, Thanks a lot, Rossouw

    C 1 Reply Last reply
    0
    • R RossouwDB

      Good day, I know there are numerous questions about the HRESULT 0x80040154 (REGDB_E_CLASSNOTREG) error, and I have seen all (maybe most) of the solutions, but none of those are of any help, I donwloaded all the possible apps that have been suggested but none of those work. I am using Visual Basic 2005, XP and Office 2003 ( I prefer to use this combination), I am also using the following dll's: - Interop.Word - Interop.Excel - Interop.Outlook - MySql.Data - All default dll's The program I have designed works perfect on my computer, but when I install it on another pc, I get this error. The other pc's have .net framework 2.0 on them, which is required for the installer to work. Ok, now where the error occurs - I am only giving two places of occurence, but it occurs throughout the program: A) As an example, there are two forms, frmMain and frmSecond, and frmMain has a button with the following code : frmSecond.Enabled = true frmSecond.Visible = true When I click the button, the error occurs at the first instance where the form object is referenced, in this case, it will be at frmSecond.Enabled = true, if this line is commented out will occur at frmSecond.Visible = true, etc. At first I thought it is because of my global variables being created as other forms or classes, so I made those local variables, local to the method using them, but that wasn't the case. B) As another example, there is one form, frmMain, and a class, clsSomeClass, and frmMain has a button with the following code : dim clsSomeClassRef as new clsSomeClassRef clsSomeClassRef.method(parameter(s)) for simplicity, the clsSomeClass manipulates a SQL database, for this example, lets say it creates as new entry in the database. When the button is clicked, the error will pop up at clsSomeClassRef.method(parameter(s)), and the class only has the MySql.data dll. I am at a complete loss of reasons, my first thought of why this is happening, is because VB is platform dependent, so I have to/must redo the program in C#, which is not platform dependent, but I first want to make sure that C# won't produce the same error, as it is a lot of work and code to redo. I you guys could help me with this error, I would be highly grateful and thankful and your efforts would be much appreciated!! It is kinda urgent, Thanks a lot, Rossouw

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Member 4247277 wrote:

      my first thought of why this is happening, is because VB is platform dependent, so I have to/must redo the program in C#, which is not platform dependent, but I first want to make sure that C# won't produce the same error, as it is a lot of work and code to redo.

      This is absolute rubbish. VB and C# produce code in the same MSIL, for the .NET framework

      Member 4247277 wrote:

      I am using Visual Basic 2005, XP and Office 2003 ( I prefer to use this combination), I am also using the following dll's: - Interop.Word - Interop.Excel - Interop.Outlook - MySql.Data - All default dll's

      Is office installed on the computers you're using ? Because the error you're getting, means that COM dll is not registered. The solution to this is to run RegSvr32.exe on the dll in question, if you distribute a COM dll. None of these are COM dlls, that I can see. Office DOES use COM, the interop dlls could well be for COM interop, and they could be complaining that the actual COM dlls they want to work with, are not present. You can use .NET instead of COM to work with Office, using the Microsoft Tools for Office. However, your app in either instance, will only work if Office is installed on the target PC.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      R 1 Reply Last reply
      0
      • C Christian Graus

        Member 4247277 wrote:

        my first thought of why this is happening, is because VB is platform dependent, so I have to/must redo the program in C#, which is not platform dependent, but I first want to make sure that C# won't produce the same error, as it is a lot of work and code to redo.

        This is absolute rubbish. VB and C# produce code in the same MSIL, for the .NET framework

        Member 4247277 wrote:

        I am using Visual Basic 2005, XP and Office 2003 ( I prefer to use this combination), I am also using the following dll's: - Interop.Word - Interop.Excel - Interop.Outlook - MySql.Data - All default dll's

        Is office installed on the computers you're using ? Because the error you're getting, means that COM dll is not registered. The solution to this is to run RegSvr32.exe on the dll in question, if you distribute a COM dll. None of these are COM dlls, that I can see. Office DOES use COM, the interop dlls could well be for COM interop, and they could be complaining that the actual COM dlls they want to work with, are not present. You can use .NET instead of COM to work with Office, using the Microsoft Tools for Office. However, your app in either instance, will only work if Office is installed on the target PC.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        R Offline
        R Offline
        RossouwDB
        wrote on last edited by
        #3

        Hi Christian, Thanx for clearing up the platform independent stuff, I have been using VB for quite some time, and people critisize me for sticking with vb, but vb is quite a powerful language though. The pcs have office installed on them, I will give the RegSvr32 a try, I didn't bother to look at it, as I have read that if you are using an installer, it will automatically register the dlls. Is there any other way (other than using COM, which I will have to register) to use Excel, Word and Outlook, or are including them in my project the only way? Thanks again, you have saved me a lot of work! :)

        C 1 Reply Last reply
        0
        • R RossouwDB

          Hi Christian, Thanx for clearing up the platform independent stuff, I have been using VB for quite some time, and people critisize me for sticking with vb, but vb is quite a powerful language though. The pcs have office installed on them, I will give the RegSvr32 a try, I didn't bother to look at it, as I have read that if you are using an installer, it will automatically register the dlls. Is there any other way (other than using COM, which I will have to register) to use Excel, Word and Outlook, or are including them in my project the only way? Thanks again, you have saved me a lot of work! :)

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Member 4247277 wrote:

          and people critisize me for sticking with vb, but vb is quite a powerful language though.

          VB6 was crap. VB.NET and C# are largely interchangable. People assume that b/c C++ was better than VB6, C# is better than VB.NET and it's not true.

          Member 4247277 wrote:

          I didn't bother to look at it, as I have read that if you are using an installer, it will automatically register the dlls.

          You don't have any dlls that need registering, at least, not in the list you provided. I don't think so, anyhow. My next step would be to look at the event code in the form that blows up when made visible, and add message boxes to work out which call is causing the error. It will be code that uses one of these libraries. Once you know which library has an unregistered dll, you'll have a much better starting point.

          Member 4247277 wrote:

          Is there any other way (other than using COM, which I will have to register) to use Excel, Word and Outlook, or are including them in my project the only way?

          You can use the Microsoft Tools for Office, which with newer versions of office, connect directly through .NET without COM. But, if Office works on these PCs, the dlls are registered. Your interop dlls define the connection to come, they don't need registering.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          R 1 Reply Last reply
          0
          • C Christian Graus

            Member 4247277 wrote:

            and people critisize me for sticking with vb, but vb is quite a powerful language though.

            VB6 was crap. VB.NET and C# are largely interchangable. People assume that b/c C++ was better than VB6, C# is better than VB.NET and it's not true.

            Member 4247277 wrote:

            I didn't bother to look at it, as I have read that if you are using an installer, it will automatically register the dlls.

            You don't have any dlls that need registering, at least, not in the list you provided. I don't think so, anyhow. My next step would be to look at the event code in the form that blows up when made visible, and add message boxes to work out which call is causing the error. It will be code that uses one of these libraries. Once you know which library has an unregistered dll, you'll have a much better starting point.

            Member 4247277 wrote:

            Is there any other way (other than using COM, which I will have to register) to use Excel, Word and Outlook, or are including them in my project the only way?

            You can use the Microsoft Tools for Office, which with newer versions of office, connect directly through .NET without COM. But, if Office works on these PCs, the dlls are registered. Your interop dlls define the connection to come, they don't need registering.

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            R Offline
            R Offline
            RossouwDB
            wrote on last edited by
            #5

            Thanks Cristian, I have used messageboxes, thats how I came up with the questions providing where the errors occur. The biggest problem that I have is this - I will guide you through what I did, so that you can see what has already been done. 'Global variables Private cls1Ref as New clsClassOne Private cls2Ref as New clsClassTwo Private cls3Ref as New clsclassThree Say, that clsClassOne is used to manipulate - add, edit, remove, get, etc - data from a SQL database, table name : tableOne; clsClassTwo is used to get data from a SQL database, table name : tableTwo; and clsClassThree sends email, creates new Word documents and makes graphs in a Excel sheet, all using the same database. Now, if these global variables are the global variables of my main form, the form won't load, the class not registered error message is displayed; if I now make the global variables local to the methos that will use the variables, say I have three buttons, each with its own class reference : 'No Global variables 'Only for the main form Private Sub Button1_Click(.....) dim cls1Ref as New clsClassOne cls1Ref.add(........) End Sub Private Sub Button2_Click(....) messageBox("Before Ref") dim cls2Ref as New clsClassTwo messageBox("After Ref") dim name as String = cls2Ref.get(.....) 'If the retrieved value is to be a string messageBox("After Retrieval") End Sub Private Sub Button3_Click(....) dim cls3Ref as New clsClassThree cls3Ref.sendMail(.......) End Sub OK, now, this is an example after I have made the global variables local, and added messageBoxes to catch where the error occurs. Now, if this is to be in the main form, the main form will load successfully, if either button 1 or button 3 is clicked, the class not registered error will occur, but if button 2 is clicked, messageBox("Before Ref") will pop up, then messageBox("After Ref") will pop up, and then the program will crash, no error, nothing, so the obvious problem then lies at cls2Ref.get(.....). Because of this, I now have made all the global variables that are assigned classes local, so now we use the same buttons with the same code, and the same thing happens as if the variables have stayed the same. All classes and forms use any combination of the following dlls : -Interop.Word -Interop.Excel -Interop.Outlook -MySql.data Some don't use the MySql.data at all, some uses only the MySql.data, and other don't use any at all. At this current moment, all my global variables that are classes

            R 1 Reply Last reply
            0
            • R RossouwDB

              Thanks Cristian, I have used messageboxes, thats how I came up with the questions providing where the errors occur. The biggest problem that I have is this - I will guide you through what I did, so that you can see what has already been done. 'Global variables Private cls1Ref as New clsClassOne Private cls2Ref as New clsClassTwo Private cls3Ref as New clsclassThree Say, that clsClassOne is used to manipulate - add, edit, remove, get, etc - data from a SQL database, table name : tableOne; clsClassTwo is used to get data from a SQL database, table name : tableTwo; and clsClassThree sends email, creates new Word documents and makes graphs in a Excel sheet, all using the same database. Now, if these global variables are the global variables of my main form, the form won't load, the class not registered error message is displayed; if I now make the global variables local to the methos that will use the variables, say I have three buttons, each with its own class reference : 'No Global variables 'Only for the main form Private Sub Button1_Click(.....) dim cls1Ref as New clsClassOne cls1Ref.add(........) End Sub Private Sub Button2_Click(....) messageBox("Before Ref") dim cls2Ref as New clsClassTwo messageBox("After Ref") dim name as String = cls2Ref.get(.....) 'If the retrieved value is to be a string messageBox("After Retrieval") End Sub Private Sub Button3_Click(....) dim cls3Ref as New clsClassThree cls3Ref.sendMail(.......) End Sub OK, now, this is an example after I have made the global variables local, and added messageBoxes to catch where the error occurs. Now, if this is to be in the main form, the main form will load successfully, if either button 1 or button 3 is clicked, the class not registered error will occur, but if button 2 is clicked, messageBox("Before Ref") will pop up, then messageBox("After Ref") will pop up, and then the program will crash, no error, nothing, so the obvious problem then lies at cls2Ref.get(.....). Because of this, I now have made all the global variables that are assigned classes local, so now we use the same buttons with the same code, and the same thing happens as if the variables have stayed the same. All classes and forms use any combination of the following dlls : -Interop.Word -Interop.Excel -Interop.Outlook -MySql.data Some don't use the MySql.data at all, some uses only the MySql.data, and other don't use any at all. At this current moment, all my global variables that are classes

              R Offline
              R Offline
              RossouwDB
              wrote on last edited by
              #6

              I have tried to register my dll's, but I get the following message: dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered.

              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