Runtime error -2147217887 (80040e21)

Posted on 2002-06-15
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.
Question by:Waratah
  • 6
  • 4

Expert Comment

ID: 7080704;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.

Author Comment

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

Accepted Solution

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.


Author Comment

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.

Expert Comment

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.


Author Comment

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.

Author Comment

ID: 7093413
The setup file had installed the Data Access components already.

Expert Comment

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.

Author Comment

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 (

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.

Author Comment

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.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
to transfer string from C lanaguage to VBA 4 70
Excel - Save a copy of work book 13 88
vb6 connector to SQL Server 2 37
backup program with robocopy 6 42
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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

792 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