Hi,

I am tired in searching the solution in google for my issue in ADODC MoveComplete

Issue:
In my application I was using reference ADO 2.0 version for ADODC connection and it was working fine. Due to some other enhancement i forced to change the version from ADO 2.0 to ADO 2.5. Now when I compile the code, I am getting the below error on the below code

Code:
Private Sub Adodc_ResEdt_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
...................
End Sub

Error:
Compile Error:
Procedure declaration does not match description of event or procedure having the same name.

After google the issue they suggest to use the below code but still am getting the same error

Private Sub Adodc1_MoveComplete(ByVal adReason As _ ADODB.EventReasonEnum, _ ByVal pError As ADODB.Error, ByRef adStatus As _ ADODB.EventStatusEnum, _ ByVal pRecordset As ADODB.Recordset) Handles Adodc1.MoveComplete

Kindly help me

in VB 6 or in .NET ?

Issue resolved:

To make the ADO Data Control events work with ADO 2.1 or later, the declaration of the event has to be changed to include:

Private Sub Adodc_ResEdt_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset20)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.