We help IT Professionals succeed at work.

ADODB Error

vibale
vibale asked
on
Medium Priority
526 Views
Last Modified: 2006-11-17
Hi,

I've used Microsoft Visual Studio's wizard manager to make me an application for connecting to an access database, but when I try to run it, I get the following error;

Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

Any ideas what's going on?

Thanks
Comment
Watch Question

Head of Software Services
CERTIFIED EXPERT
Commented:
You have not upgraded to SP4, the data control that is on the form is from SP3 or lower and you are using ADO 2.1 or higher in your project. There are two options, either upgrade to SP4 or SP5, these include a newer version of the ADO data control that supports higher versions of ADO. Alternatively, amend the declaration:

Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error,
adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset20)

And any similar events of the ADO data control, essentially change ADODB.Recordset to ADODB.Recordset20 as the last parameter of each event declaration.

The reason for this is that the interface was changed between ADO 2.0 and ADO 2.1 by Microsoft. There is nothing else that you can do. Either of these solutions will work, it is up to you to choose which you wish to implement!
Ryan ChongSoftware Tead Lead / Business Analyst / System Analyst / Data Engineer
CERTIFIED EXPERT

Commented:
Hi vibale,

Maybe this link is helpful: http://www.microsoft.com/Data/download.htm

regards.
CERTIFIED EXPERT
Author of the Year 2009

Commented:
Hi vibale,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

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

vibale, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Per recommendation, force-accepted.

Netminder
CS Moderator

Explore More ContentExplore courses, solutions, and other research materials related to this topic.