PDA

Click to See Complete Forum and Search --> : What is going on?


Stockton.S
Oct 5th, 2000, 06:43 AM
I have been looking at the, OLE DB is the Answer! website online help:

http://msdn.microsoft.com/library/default.asp?URL=/library/partbook/asp20/howtoperformqueriesusingado.htm

and following the instructions but applying it to my program, I have an error that I cannot understand and was wondering if you guys could shed some light on the matter.

The error I get is "Procedure declaration does not match description of event or procedure having the same name."


This occurs when I put a line of code in the Movecomplete event command in the ADODC control.

Can you help?

Is this a problem with the example?

Simon

Bigley
Oct 5th, 2000, 07:44 AM
It usually means that the way the sub has been written is wrong - let me explain. If you had an array of textboxes called Text1 and you wanted to put something in the change event you might think it would look like this

Private Sub Text1_Change()
'something here
End Sub

but because it is an array it should read

Private Sub Text1_Change(Index As Integer)
'something here
End Sub

There should be an value passed into the procedure in this case the index of the item in the array that has changed. You should make sure that when you want to use a sub that you choose the control from the left drop down and the event from the right dropdown on the code window, sometimes things are passed that we don't know about.

Good luck

Stockton.S
Oct 5th, 2000, 07:55 AM
Thanks for your info on that but I still cannot see how that applies to this case the code below is the code that is erroring.


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

Label1.Caption = "Simon why is this not working?"

End Sub

I basically double click on the ADODC1 control and select from the right combo box MOVECOMPLETE and enter a simply line of code but it still errors.

Any suggestions?

Simon