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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX can't create object and msado15.dll cannot register

Status
Not open for further replies.

dtqui

Programmer
Sep 25, 2000
62
SG
Hi,

I'm using VB6 to develop a program and I need to do a package to setup in another PC. The package wizard picks up msado15.dll which I'm using in the program but after setting up in the PC and running my program, it returns "ActiveX can't create object error".
I tried to unregister msado15.dll from the windows/system directory and it gave me a LoadLibrary error. I tried to register msado15.dll again but it also return a LoadLibrary error.
I tried to install MDAC in the hope that it can "repair" the error but MDAC prompts that msado15 cannot be registered too.
I have another copy of msado15 in the common files directory. How do I know which msado15 is causing the problem?

Can anyone suggest what I should do?

Thank you.

Regards,
Doris
 
hi mr.doris,

Is your application working perfect at the first instance?
i think such an error appears if there is any error in the code.You must have used a createobject function where you must be using getobject.or the particular application you are refering to in your application is not installed on the other PC.OR you would have missed a statement which needs a set command to initialize an object.

Please check your code once again.I think you would surely find the defects i pointed out in your code.

If that is not the case please reply.

Rajendra
sairajendra@hotmail.com
 
First I need to know the following:

1) What version of MDAC are you running...

2) What version of VB (and service pack are you running?

3) What references do you have checked?


4) What components do you have checked?

----------------------------------------

5) remove/copy for safe keeping the msado15.dll from the windows/system directory since that is originally where the problem seems to be coming from.

6) Install Mdac_typ.exe (minimum of ADO 2.5) to your desktop; if you can't find it on the Internet email me back and I will find it for you.

7) Install VB6's Service Pack 6 (6 is the highest sp); (make certain you have completed steps 5 and 6 before installing this service pack) to your desktop; if you can't find it on the Internet email me back and I will find it for you or help you walk through it.

8) Now look into you project references and components and make certain all that you need for your appliation is checked.

9) In References you should have (at the very least):
----Visual Basic for Applications
----Visual Basic Runtime Objects and Procedures
----Visual Basic Objects and Procedures
----Microsoft ActiveX DataObjects 2.5 Library
----if you have DAO or 2.1 or any other references
----remove them and let the 2.5 take their place
----OLE Automation

10) In my components all I have is these but you might
need either of them depending on what your app needs.
----Microsoft ADO Data Control (6.0 (sp4 oledb)
----Microsoft DataGridControl 6.0 (sp5 oledb)

11) Compile and run your program only after you have completed items 1 thru 10 above. You cannot proceed to step 12 unless you have a clean compile and your exe is working the way it should.

12) NOW keep elsewhere (for the sake of referencing) the prior setup.exe and the suppor folder and all its cab files and dlls and lsts.

13) NOW Re-RUN a clean deployment Wizard now that you have a clean ADO and clean VB6 area with its appropriate patches in place.

14) Hopefully you have gotten this far and all is better. I wouldn't "mess" with the registry on anyone's pc.... let the deployment wizard handle it all through their setup.exe

15) Once ok on your pc the next thing you need to do is remove that msado15.dll from the desktop(s) that may have it (for now anyway). DO NOT provide the new desktops with the new setup exe YET. You must first run the new 2.5 ADO mdac_typ.exe against their pcs. At this point they should test for a few days hitting all appliations without DLL conflicts.

16) THEN you can run your Wizards Setup.exe which will make entries as needed into the registry for you and place the dlls where they need to be.

17) I would let that deployment settle for a few days to ensure no conflict with other desktop apps BEFORE deploying your EXE to the desktop.

I have lived and survived this DLL nightmare... this is what worked for me... When VisualEnterprise.Net comes out in January, all of this DLL stuff is going to change... the deployment wizard will then begin to house each app's respective dlls in a personal folder named by the developer for the particular app... so this crap wont KEEP killing us as we go forward.

I will be glad to walk you through any of the above processes.... I also apologize if I have given you information that you already know and tried...or in your search for something else. Either way, this dll hell hit home and I felt pretty confident that this might help you.

rdc
 
Hi,
sorry for the late reply, could not "book" the pc for testing. I'm a Miss by the way. :)

I have previously installed this program in my user's PC (Win98) and it was running fine. It's when I'm trying to install into a Win95 PC that I hit problems.

Rdc, I'm running MDAC version 2.5, using VB6 with SP 5.

References I've checked:

Visual Basic for Applications
Visual basic Runtime Object & procedures
Visual Basic Objects & procedures
OLE Automation
Microsoft DAO 3.51 Object Library
Crystal report viewer control
Crystal report 8.5 activex designer runtime library
crystal report 8.5 activex designer design and runtime library
Microsoft Activex Data Objects 2.6 Library (msado15.dll)

Components I've used:

crystal report viewer control
MS Comm Control 6.0
FlexGrid control 6.0 (SP3)
Windows common control 5.0 (SP2)
windows common Control-2 6.0 (SP4)

I've removed msado15.dll from the windows/system directory and install MDAC. But MDAC gave an error "Error registering the OCX C:\Program Files\Common Files\System\ADO\msado15.dll". It then shows the installation is successful. What does this error means? I suspect this is where everything went wrong.

Thanks.
 
Sorry -I was away-- do you still need help?
 
Hi RDC,

Thanks for your reply!! I have re-format that PC and the ADO is able to register again. The program is working!! LOL
 
Hi,

I'm using VB6 to develop a program and using the Package&Deployment Wizard to install on another PC.

The package wizard picks up msado15.dll which I'm using in the program but after setting up in the PC and running my program, it returns "ActiveX can't create object error".
The Package&Deployment Wizard after running gives the following error 'msado15.dll could not be registered'.This LoadLibrary error happens only when i am installing on Windows 98 machines.(I have developed the application on my PC which has Windows 95.)On Windows95 machines the installation is performed smoothly.
I tried to install MDAC2.0 in the hope that it can "repair" the error but MDAC prompts that msado15 cannot be registered too.
I am using msado15.dll version 2.50.4403.9.And i have included Ado2.1 in reference in my VB Project.
Please Help ASAP.

Thank you.

Amit
 
If you are in VB6 Service Pack 5 I know I can help you... if you are not I can try to help you:

1: First of all VB6/Service Pack 5 is the MOST recent service pack and has rid Vb6 of some bugs that may or may not involve your problem; when you start VB on the "splash screen" it will tell tell you that it is VB6 and what service pack it is.

2: I happen to know, via my own recent and painful experience, that VB6 sp5 (and maybe even your level service pack used) will NOT work without the ado2.5 upgrade done FIRST... and BEFORE any VB deployment.

3: You can respond to me via how you just did or email me direct at dimariacrowe@hotmail.com and also at rosemary.dimaria-crowe@thehartford.com to ensure I will get your reply... when you respond, please let me know what your time contraints are-- I've "been there" and needed help in a pinch and would be happy to do my best to help you... rdc

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top