-
Okay, here's my problem. One of the applications I am working on seems to have a problem accessing certain databases. It works just fine in design time, but after I create the .exe file, and run the application, I get an error that tells me that "ActiveX component can't create object." when I try to access one of the databases used. On another database, I get an error telling me "Class not registered." Has anyone else run into this? I've tried everything I can think of.
-
Are you trying to run the .exe on a different machine to the one you developed on? If so you are probably missing the DAO/ADO files for accessing the database.
-
Yes, it is on a new machine, but I already checked for the DAO/ADO file problem.
-
You probably already checked this, but are the PC's running the same version of MDAC? I had a problem with this earlier in the week when I upgraded the development PC to Service Pack 4. I couldn't open tables on SQL Server 7 after recompiling the exe since they had different versions of MDAC installed. Had to make sure both were updated.
You might try using the Deployment Wizard to make sure all components are being installed on the target PC.
-
Is Visual Basic installed on your new machine ?
Because if It's not installed, you have to copy the
component which is used for the connection with your
database. (.ocx)
You can see its name in the components manager.
-
You'll need to register it too:
regsvr32 control.ocx
A window will pop up giving more information.