Solved

Data Grid Wizard generated code won't compile

Posted on 2004-05-01
4
279 Views
Last Modified: 2013-12-25
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)
End Sub

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
  Case adRsnAddNew
  Case adRsnClose
  Case adRsnDelete
  Case adRsnFirstChange
  Case adRsnMove
  Case adRsnRequery
  Case adRsnResynch
  Case adRsnUndoAddNew
  Case adRsnUndoDelete
  Case adRsnUndoUpdate
  Case adRsnUpdate
  End Select

  If bCancel Then adStatus = adStatusCancel
End Sub

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)
0
Comment
Question by:NevaB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Expert Comment

by:p_sie
ID: 10968934
Do you get an error message at a specific line?
What does Run with full compile do (CTRL + F5) ?

Did you install an upgrade of ADO?
0
 

Author Comment

by:NevaB
ID: 10973463
I figured it out by myself.  I had to go into Project, References and uncheck the MS ActiveX Data Objects Library 2.0 and click the version 2.7

Evidently when I used the VB Package and Deploy wizard it screwed me up.  
0
 

Accepted Solution

by:
PashaMod earned 0 total points
ID: 11015201
Closed, 250 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question