Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oh no! Another "portability" problem. 3

Status
Not open for further replies.

elziko

Programmer
Nov 7, 2000
486
GB
I'm running my VB app on lots of diffrent computers now. It works fine on some but I have a new run-time error on others:

"Class not registered

Looking for object with CLSID:{blah blah}"

This seems to have the effect on rendering my data control useless as well as any text boxes based on this control.

How do I go about regitering this class? Or is it something else??

Many Thanks

elziko
 
The only problem here is that you have not correctly installed all of you programs dependancies . . .rerun your install after making sure that all of the required dependancies are included.
If you are not sure what file you need, then copy the GUID from the error message and check the registry on you development box (HKEY_CLASSES_ROOT\CLSID\{GUID}] and try and determine what component you need. - Jeff Marler
(please note, that the page is under construction)
 
Ah I see! I'll give it a go. The problem is obviously coming from the fact that I'm running my .exe off the network as opposed to installing it on each machine. What I think I should do is create somekind of setup file that cheks for all the dependancies.

So, apart from the one above which I know that I need, how do I find ALL the dependancies?

Many thanks

elziko
 
YES! You HAVE to run your application's install . . . you can't just assume that every PC out there has all of the dependancies that you are going to need.
VB's package and deployment wizard should give that to you, but if you want to check yourself, click on projects on the menu bar and then click on references . . . you will also need to check components in the same menu. - Jeff Marler
(please note, that the page is under construction)
 
Oh! There seems to be many thing I need to learn!!! VB5 has said installer? I know VB6 has but we only have VB5 at work.
 
This is not the first time you ask the question or problem !!

VB 5.0 have a Setup Installer ,VB6 have a PDW installer

What is no the problem ?,make a Setup ? Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Eric,
Yeah, yeah . . . mock away . . . :)!I've not been able to put a lot of work into my page at the moment since I've just started a new job(the actual page is being developed on my workstation and I am not moving it up to the server until it is ready) and I still trying to arrange all of the content. It is going to be a programming page with articles and code samples and then some demos of the software that I have developed.
There! I've defended myself . . . back to code. - Jeff Marler
(please note, that the page is under construction)
 
Thanks guys and edderic, I must apologize for annoying you! I dont remember asking such a question so I assume it was quite a while ago and I forgot to follow it up, so I'm sorry.

I've used the setup wizard enabling me to install the dependancies but I still get the same error (see start of thread). There are four files quoted as not having dependancy files by the wizard:

DAO360.DLL
OLEDBB32.DLL
MSADO15.DLL
MSADOR15.DLL

I'm sorry just to give a list of these files but I have no idea where I can find their dependancies or wether it is the lack of these dependancies that is causing the above error. I assume it is one/both of the first two that might stop my data control working?

Anymore help really would be appreciated,

elziko

 
What GUID id the application looking for? If it is a common control/object, you should be able to check a PC where the app is working (in the registry) and see what the component is. - Jeff Marler
(please note, that the page is under construction)
 
Ooops, sorry. I was so busy playing with the setup thing I forgot to check the registry entry on my dev machine.

Thanks

elziko
 
Jeff,

yeah thanks. I've checked the registry entry given in the error. Sure enpugh it exists in the registry of my development machine but not the machine I'm deploying it to.

I added the reistry entry to that machine and now it works OK.

However, this will happen again on other machines. My first instinct is to add some code to my program which checks for the existence of this reg entry and then adds it if it doesn't exist since the setup wizard of VB5 doesn't want to do this for me.

Do you see this as a bad idea adding reg entries like this? Will it cause problemsfor other machines? I would of course make sure thet any files that the entry refers to exist in the correct folders too.

I'm almost there,

Thanks,

elziko
 
I surprised that the the Setup wizard didn't do this for you . . . . Yeah, you can check the registry everytime the application is run and add it as needed, but that sounds like a pain. Also, it depends what key it is (some keys requires others such as CLSIDs and TYPELIBs). Post the key that you need to add in here and I'll see if I can tell you what it is for and why it is not being added automatically. - Jeff Marler
(please note, that the page is under construction)
 
Jeff,

you are too kind! :)

Here is the key I speak of. I think its not an unusual Key for a VB program toi have!?

HKEY_CLASSES_ROOT\CLSID\{00000010-0000-0010-8000-00AA006D2EA4}

It also has these two sub keys:

\InprocServer32
\ProgID

Many thanks,

elziko
 
This CLSID GUID {00000010-0000-0010-8000-00AA006D2EA4}
is for "DAO.DBEngine.35" (check the ProgID key). Since not all of your users have this key, I would have to guess that they do not have DAO 3.5 correctly installed. Rebuild your installation progam and make sure that you have all of the DAO 3.5 library references included.
If that does not work, then the users may have to reinstall MDAC in order to correctly get the correct version of DAO on their system. You may need to modify your setup application to shell out an instance of the MDAC setup application.
Either way, the problem that you are having is being caused by users not having the correct DAO library install, so you should concentrate your efforts there. :)

- Jeff Marler
(please note, that the page is under construction)
 
elziko:

Redistributing ADO, RDS, and other Microsoft Data Access Components correctly and safely with the Visual Basic 5.0 Application Setup Wizard is done by SHELLing out and running the MDAC_TYP.exe.

You may download the latest version of MDAC_TYP.exe from the following site:





MORE INFORMATION
This article assumes you have ADO is already installed on your computer.

The MDAC_TYP.exe setup includes only the binaries necessary to redistribute the components; it doesn't include documentation. This file can then be called from Setup1.frm's QueryUnload method.

Note that in addition to MDAC_TYP.exe, you may need to distribute DCOM95 for your Windows 95 clients. DCOM must be installed prior to the installation of MDAC. Note that Windows 2000, Windows NT 4.0, and Windows 98 have DCOM built in. You may download the latest version of DCOM95 from the following site:

Note that DCOM must be installed separately and before MDAC_TYP.exe and your Setup program. DCOM cannot be installed from within your Setup program.
How ADO and the Application Setup Wizard Interact
Currently, it is not possible to correctly install ADO/DB components with the Visual Basic Setup Wizard for Visual Basic 5.0 applications. This is due to several limitations in both ADO/DB required components and the Visual Basic Setup Wizard described below:

ADO and OLE-DB components, for future compatibility, must be registered in specific locations, for example:


\program files\common files\system\ado
\program files\common files\system\ole db

The Visual Basic Setup Wizard, when registering a DLL, does not change the directory to the location of the DLL being registered.


The OLE-DB DLL, Msdatl.dll, which is required for other OLE-DB components that ADO uses to register, is not self-registering. When Visual Basic attempts to register those DLLs, Msdatl.dll is not found in the "...\OLE DB" directory. Because the DLLs fail to register, ADO also fails to register.


The MDAC Setup may have to restart the system, depending on what the user has loaded in memory when setup is started. Thus, the Shell command is used to spawn the MDAC setup. Using SHELL allows for Setup1 and Setup to exit properly and to clean up after themselves.
Distributing ADO with the Application Setup Wizard
To redistribute your own ADO/DB-based project, complete each of the following steps: (You can safely ignore warnings about no dependency information for ADODB.)

The MDAC redistribution file is MDAC_TYP.exe, which includes the OLE DB providers for SQL Server, Access, and Oracle; the ODBC drivers for SQL Server, Access, and Oracle; ADO; and RDS.
Eric De Decker
vbg.be@vbgroup.nl

License And Copy Protection AxtiveX.

Download Demo version on my Site:
 
Wow! That was pretty comprehensive. Many thanks. I did try some sort of MDAC installer but it wasn't the one you mention.

I didn't realize that ADO had to be OK first.

Thanks again,

elziko
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top