Data Grid Wizard generated code won't compile
Posted on 2004-05-01
I have an application that I have a datagrid in that I generated with the Wizard. The application compiled and ran fine from within VB. I then packaged and deployed my application and installed it on my computer. Now when I run it from within VB this code won't compile:
Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This will display the current record position for this recordset
datPrimaryRS.Caption = "Record: " & CStr(datPrimaryRS.Recordset.AbsolutePosition)
Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean
Select Case adReason
If bCancel Then adStatus = adStatusCancel
I believe the first method is just to put the record number in the caption of the ADODC and the second is just an empty template.
The error message I get is "Compile error. Procedure declaration does not match description of event or procedure having the same name."
I don't think I made any changes in my code since I packaged and deployed it.
My questions are:
1. Does it sound like I did something wrong in the packaging, deploying and installing process or does it sound like I made a change and didn't realize it?
2. If it is was caused by the packaging, deploying and installing process, what can I do?
3. If it sounds like I accidentally made a change to my code, what does that error message mean?
4. Can I just comment out that code?
5. Why am I being punished? (No, just kidding)