Solved

Runtime error -2147217887 (80040e21)

Posted on 2002-06-15
10
475 Views
Last Modified: 2008-03-17
I have a VB6 application which updates SQL Server7 data using ADO. The app was developed on a WinME machine and all  functions are OK. The app was packaged and deployed to a Win98 machine and the Update method generates the runtime error -2147217887. I downloaded and installed 'DCOM98.exe' on the Win98 machine but with no apparent improvement. I have deployed the app on to the original WinME machine to check on the package&deployment and the installed app performs OK.
I have read two previous EE questions and the MSDN articles Q168335 and Q168354; none of the explanations or solutions seem appropriate.
All relevant advice will be gratefully accepted.
0
Comment
Question by:Waratah
  • 6
  • 4
10 Comments
 
LVL 4

Expert Comment

by:RichW
ID: 7080704
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q168354

Here's a link that explains a little about your error.  Unfortunately, it explains that this error is OLE-DB not being able to explain what the error is!

There's a lot of other error information on the page, so I hope it's helpful.
RichW
0
 

Author Comment

by:Waratah
ID: 7081832
Just to add to my original question :
I am making references to Activex Data Objects 2.0 and OLE Automation.

The problem occurs (only on the Win98 test machine, not the WinME development machine) with the following code -
        !Name = txtName
        !Address1 = txtAddress1
        !Address2 = txtAddress2
        !Address3 = txtAddress3
        !County = txtCounty
        !Postcode = txtPostcode
        !Fax = txtFax
        !Phone1 = txtPhone1
        !Phone2 = txtPhone2
        !ReportDays = txtReportDays
        .Update
0
 
LVL 4

Accepted Solution

by:
RichW earned 100 total points
ID: 7082368
Upgrade to 2.7 for ADO.  Download the new MDAC file.

RichW
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:Waratah
ID: 7090279
Upgrading will not explain why the ADO 2.0 functions work fine on the development machine but not on the test machine.

I really need to know what I should add to the P&D package or to the test machine to allow ADO to operate.
 
0
 
LVL 4

Expert Comment

by:RichW
ID: 7090351
Ok, dumb question, but I have to ask, did you load the MDAC file onto the test machine?

You can do a silent install of the MDAC_Type.exe file.

I thought you grabbed the files in the P&D Wizard for ADO.

RichW
0
 

Author Comment

by:Waratah
ID: 7093314
Not a dumb question, as a similar thought had also crossed my mind. I had assumed that the setup.exe would take care of all files.
The P&D Wizard did pick up the MDAC file (the report contained the warning about having to install DCOM98 for Win95/98 because the MDAC_TYP.EXE file had been included in the package).
I had thought about running the MDAC_TYP.EXE separately to the setup.exe . I will give it a try.
0
 

Author Comment

by:Waratah
ID: 7093413
The setup file had installed the Data Access components already.
0
 
LVL 4

Expert Comment

by:RichW
ID: 7093506
Okay, but now try loading the MDAC file by its own installation, and then test the software.

If it runs, then the P&D Wizard isn't picking up everything.
0
 

Author Comment

by:Waratah
ID: 7096895
I have installed and run MDAC on its own with the same results as before.
Is there a possible problem with the version of MDAC (2.1.1.3711.11)?

I have noticed that the PDW does not include MSADO20.tlb when there are references to ADO 2.0 and does not include MDAC_TYP.exe when there are references to ADO 2.1. I have tried changing the references in the app from ADO 2.0 to ADO 2.1 - same result, even after changing the Setup.lst file to resolve the "Register MSADO21.tlb" problem. Is there any mileage in changing the references to ADO 2.5 (the highest available on my development machine) or to any combination of those available (eg 2.0 & 2.1 OR 2.0 & 2.1 & 2.5) ?

In the meantime, I will download SP5 for VB6.

Thanks for you co-operation and patience.
0
 

Author Comment

by:Waratah
ID: 7099274
I downloaded SP5 for VB6 and repackaged the application adding MSADO20.tlb (the app makes references to ADO 2.0), just in case. The PDW included  version 2.5 of MDAC_TYP.exe (whereas previously, it was using version 2.1). I amended the SETUP.lst file (see Q299645 on MSDN) and installed the app on the Win98 test PC. It worked a treat.
I also packaged another app, which uses ADO 2.5 (the highest version on my development PC) and deployed it on the test PC without any further additions or amendments to the package. Again, no apparent problems.
It appears that the upgrade to SP5, which included MDAC 2.5, has resolved the problem.

Many thanks.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question