?
Solved

run-time error -2147217885 with RecordCount

Posted on 2003-03-05
4
Medium Priority
?
304 Views
Last Modified: 2007-12-19
I am retrieving the current record number and the total records in the database with .AbsolutePosition and .RecordCount in a MoveComplete() event in an ADO recordset.  During testing, a problem arose when I tried to add a duplicate record to the database.  When I acknowledge the error and then Cancel the update, I get -2147217885 error, something about deleting a record.  I think the problem is that the MoveComplete event adds to the record count before the update is actually completed.  I tried placing it in the Reposition event, but that doesn't work at all.  Can anyone help me?
0
Comment
Question by:boatmand
  • 2
4 Comments
 
LVL 11

Expert Comment

by:supunr
ID: 8075735
Refering to article Q236624 in MSDN, this was a but in Microsoft ADO.  Try installing MDAC_TYP.EXE to install latest ADO 2.6+.  Good Luck!
0
 
LVL 11

Accepted Solution

by:
supunr earned 400 total points
ID: 8075793
OK, here is the link to download MDAC.
http://www.microsoft.com/data/

More info from
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmdac/html/data_mdacinstall.asp

remember, once you downloaded the latest version, you may have to reference that in your VB Project. that is go to Project->References and include "Microsoft Active Data Object Library 2.#"

Good Luck!
0
 

Expert Comment

by:CleanupPing
ID: 8900619
boatmand:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9074048
Moderator, my recommended disposition is:

    Accept supunr's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

621 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