Procedure Decloration does not match event 
Author Message
 Procedure Decloration does not match event

After hitting f5 I immediately receive the following error: Procedure
Declaration does not match description of Event. Here is the exact line of
code that is causing the error:
Private Sub datPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As
ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
    The appropriate data objects have been selected in the references dialog
box. It looks as though the MoveComplete event is not supported by the
procedure, but I don't know. The rest of the events in this line of code
look fine. NEED HELP PLEASE!


Mon, 13 Oct 2003 08:25:07 GMT  
 Procedure Decloration does not match event

Quote:
> After hitting f5 I immediately receive the following error: Procedure
> Declaration does not match description of Event. Here is the exact line of
> code that is causing the error:
> Private Sub datPrimaryRS_MoveComplete(ByVal adReason As
> ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As
> ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

I assume the Sub you posted is the event procedure, so you have something
called
datPrimaryRS which raises an event called MoveComplete.

So datPrimaryRS contains an event declaration line like

Public Event MoveComplete(....parameters....)

 I would think the problem must be that the event declaration in
datPrimaryRS doesn't match the one you posted.

Try commenting out the Sub and letting VB recreate the Sub declaration by
choosing it from the dropdown list of possible procedures for datPrimaryRS.

Hope this helps,
Peter



Mon, 13 Oct 2003 17:16:03 GMT  
 Procedure Decloration does not match event


Quote:
>After hitting f5 I immediately receive the following error: Procedure
>Declaration does not match description of Event. Here is the exact line of
>code that is causing the error:
>Private Sub datPrimaryRS_MoveComplete(ByVal adReason As
>ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As
>ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
>    The appropriate data objects have been selected in the references dialog
>box. It looks as though the MoveComplete event is not supported by the
>procedure, but I don't know. The rest of the events in this line of code
>look fine. NEED HELP PLEASE!

Try

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

If datPrimaryRS is the ado Data Control, it was originally compiled
under ADO 2.0.  It cannot cope with the ADODB.Recordset declaration at
the end.

Richard.



Mon, 13 Oct 2003 20:09:39 GMT  
 Procedure Decloration does not match event

Tech

Quote:

>After hitting f5 I immediately receive the following error: Procedure
>Declaration does not match description of Event. Here is the exact line of
>code that is causing the error:
>Private Sub datPrimaryRS_MoveComplete(ByVal adReason As
>ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As
>ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
>    The appropriate data objects have been selected in the references
dialog
>box. It looks as though the MoveComplete event is not supported by the
>procedure, but I don't know. The rest of the events in this line of code
>look fine. NEED HELP PLEASE!

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Tue, 14 Oct 2003 02:21:14 GMT  
 Procedure Decloration does not match event
Guess I clobbered my first attempt - sorry...here it is again -Rich
----
Try converting all your event subroutine declarations from "pRecordset as
ADODB.Recordset" to pRecordset As ADODB.Recordset20" as described below and
try again to see if this is truely the problem. It should get you going again
- then youll have to chase down servicepacks etc. to get it right....

Look further in newsgroups microsoft.public.data.ado for "ADO Version
confusion"

Below Ive copied explanation posted there by Lothan:

Quote:
>There is a compatibility issue between versions of MDAC and versions of the
>ADO data control. The ADO data control bundled with VB6 (including SP1
>through SP3) uses ADO 2.0; the version of the ADO data control included with
>VB6 SP4 uses ADO 2.5. If you are using MDAC 2.1 or 2.5 but have not yet
>upgraded to VB6 SP4, you must change the last parameter from pRecordset As
>ADODB.Recordset to pRecordset As ADODB.Recordset20 to force the event to use
>a 2.0 Recordset object. Note that when you finally update to VB6 SP4, you
>must revert the declaration back to pRecordset As ADODB.Recordset.
>Which versions you should use depends entirely on your needs and
>environment. My recommendation is to use MDAC 2.5 with VB6 SP4.

Good luck -  Rich

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Tue, 14 Oct 2003 02:25:16 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Error: Procedure Declaration Does Not Match Description of Event

2. Error: Procedure Declaration Does Not Match Description of Event

3. Procedure declaration does not match description of event

4. Error: Procedure Declaration Does Not Match Description of Event

5. Event procedure doesn't match definition

6. Procedure declaration does not match description .....

7. Seek Nearest Match if exact match not found ?

8. Seek Nearest Match if exact match not found ?

9. Event procedure dec does not match des. of event?

10. DoEvents not doing any events

11. MCI Control Gets Into a Tizzy - Done Events Not Being Generated

12. Event Procedures Not Working

 

 
Powered by phpBB® Forum Software