Strange ADODC ActiveX Data Control (ADO) DataControl Error

Strange ADODC ActiveX Data Control (ADO) DataControl Error

Post by R.S. McFarlan » Wed, 10 Oct 2001 13:49:58



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

 
 
 

Strange ADODC ActiveX Data Control (ADO) DataControl Error

Post by Jason Kin » Wed, 10 Oct 2001 17:09:43


I have been having exactly the same problem with a slight
twist.  For no apparant reason a form that I created with
the Data form Wizard displays the same behaviour when I
try to run it in VB 6.0; however it will then for no
apparent reason run, afterwhich if I save the project I do
not have a problem.  However if I create another form with
the data form wizard I get exactly the same problem.  

Therefore I would be extremely interested to know the
cause of this poblem.

 
 
 

Strange ADODC ActiveX Data Control (ADO) DataControl Error

Post by Ertugrul Uysa » Thu, 11 Oct 2001 23:25:35


This happened when we switched from ADO 2.0 to ADO 2.1. (or 2.5) Make sure
you have "installed" the latest ADO. (run latest mdactyp.exe on (every)
machine, then compile and run)

> 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