Database project problem
Okay so I finished a project of mine where I am able to enter whatever data I need to in the textboxes, comboboxes etc on my form, I send, it saves to an access database. So I have run this through Visual Basic 6.0 and everything works fine, not ONE hiccup. It is working superb! BUT... I compile my project and when I open it, I get this message first:
"Run-time error '429':
ActiveX component can't create object"
Which is then followed by this message:
"Class not registered.
Looking for object with CLSID:{00000010-0000-0010-8000-00AA006D2EA4}"
What does all of this mean? I am using the visual basic at my work to compile as I have had no time to compile at work but it runs under Visual Basic 6.0 just fine, until I compile.
Can somebody please explain to me what is happening and how I can fix it?
Thanks guys
# 1 Re: Database project problem
If it doesn't run where you create it, use Cntrl-F5 to start it (with full compile)
If it doesn't run elsewhere, download the vb6runtime library, or create an installation package.
# 2 Re: Database project problem
Maybe you are trying to run the compiled app on a different PC than the one it was compiled on? True? If so, you are missing one of your references on the target PC. You can use the package & deployment wizard (i.e., setup wizard) to build a package to install on the target pc, as David suggested. Or you can determine which OCX/DLL is mssing and copy/install that on the target PC.
# 3 Re: Database project problem
Maybe you are trying to run the compiled app on a different PC than the one it was compiled on? True? If so, you are missing one of your references on the target PC. You can use the package & deployment wizard (i.e., setup wizard) to build a package to install on the target pc, as David suggested. Or you can determine which OCX/DLL is mssing and copy/install that on the target PC.
Well the thing is, I have not one OCX file in the project at all, its all just Visual Basic 6.0. I installed the runtime files for VB6.0 all over the network and nothing happens still. I ran AND compiled on the same machine, doesnt work when I compile but works when I run it in Visual Basic.
What the hell is going on? :(
# 4 Re: Database project problem
If you are using ADO, you should have at least on dependency file. Open your vpb file in notepad and you will see dependencies. You can ignore the stdOLE2 one, but any others are referenced in your project and your project expects them. If they are not installed on the pc, then what you are experiencing is generally the result. In the vbp file look for lines that begin with Reference= or Object=. References are generally DLLs whereas Objects are generally OCXs. You can also use the IDE menus: Project|References to view references too.
# 5 Re: Database project problem
Well the thing is, I have not one OCX file in the project at all, its all just Visual Basic 6.0. I installed the runtime files for VB6.0 all over the network and nothing happens still. I ran AND compiled on the same machine, doesnt work when I compile but works when I run it in Visual Basic.
What the hell is going on? :(Generally you can run in troubles when using a program not compiled on the machine where it should run, if you are not building up a setup package for the program and regullary install it on the other machine, as you would also install programs bought by a firm. There may be different dependences, to activeX as in your case, but it could also happen that you get in trouble with different versions of other dll's called by the program you never will know in before.
So the long time experience rule is. "Create a setup package ( you have this tool in the Visual Studios IDE ( package Assistant ) ) It needs you 5 minutes and saves you hours :D "
# 6 Re: Database project problem
I ran AND compiled on the same machine, doesnt work when I compile but works when I run it in Visual Basic.
That's why I said to start with Control-F5, which is Start WITH FULL COMPILE.
It will give you an error of some type.
# 7 Re: Database project problem
That's why I said to start with Control-F5, which is Start WITH FULL COMPILE.
It will give you an error of some type.
I didn't receive any errors and I played around with everything in the application. Not one error. Works like it should, until I compile it. I will try the other guys suggestions and see what happens. I will post up a little report of which solution worked once I get back to test
# 8 Re: Database project problem
Copy all the files to a new folder, and then try it.
If you started with a full compile in the IDE, it should run on your machine.
Perhaps you need to reinstall VB?
# 9 Re: Database project problem
Two additional hints
a) Have you used 'option Explicit on all of your pages of code ?
If nor to so and then recompile and look for errors
b) look into project references. Maybe something is added to your references by error and you have overseen this. This way an activeX you are not using could be attached to your project. So as you dont use it your program works when simple started but gives an error when fully compiled an the incorrectly added activeX which is maybe missing or was deleted in between isn't found in compiletime.