Strange ADODC ActiveX Data Control (ADO) DataControl
Error: ‘declaration does not match … procedure having
same name’.
I have a ActiveX Data Control (ADO) DataControl
named ‘datPrimaryRS’ on a form in an application. On
one machine, the application boots up and runs without
difficulty. On a different machine, the application
never gets fully booted, instead registering a Visual
Basic error pointing to the datPrimaryRS_MoveComplete
function and stating:
“Compile error. Procedure declaration does not match
description of event or procedure having the same name.”
The function it highlights as erroneous is:
Private Sub datPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADODB.Error,
adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
I checked both machine and they seem to have identical
references and components for the project:
OLE Automation
DAO 3.51 Object Library
ActiveX Data Objects 2.0 Library
Data Binding Collection
Funny thing is it used to work fine on both machines.
Now one machines always complains of this error and fails
to compile. I did not change the subroutine signature
of datPrimaryRS_MoveComplete, nor its parameters.
MSDN\adooo210.chm::/htm/mdevtwillmove.htm says that the
signature is: MoveComplete adReason, pError, adStatus,
pRecordset. The application on the machine that the
program runs fine on has the same code in it yet it does
not complain.
Any suggestions on what is causing this mystery would be
much appreciated.
Puzzled