ADODC Recordset problem

mccindy asked this question on 12/6/2011. It has been viewed 934 times, and is currently resolved.

I am having problems with ADODC Recordsets. I moved a VB 6 (SP6) project from XP to a Win 7 64 bit system.

My movecomplete functions get a compile error "procedure declaration does not match the description of the event or procedure having the same name". I've searched some, but can't find a solution that works. The project reference includes Microsoft ActiveX Data Objects Recordset 2.8 library on both the XP and Win 7 systems.

The other references all look the same on both systems. Can you provide any input?

Here is the code declaration that is failing...

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


Answer from FortyPoundHead on 12/6/2011

Does the project include references to other, earlier versions ADO versions as well? If so, uncheck those earlier versions. I'm thinking particularly of v2.0.

This error can also occur if procedure has the same name as an event, but does not have the same signature (that is, the number and types of the parameters).

This can occur if you do something such as add a new parameter to an event procedure. For example, if you modify the definition of a form's Form_Load event procedure, the error will be generated.

If you don't have the ADO reference mentioned earlier, you can try this to fix it:

Lift the code within the sub, and drop it in Notepad. Save it, for safetys sake.

Delete the sub. Not just the code within it, but from the "Private Sub" line all the way down to the "End Sub" line.

Save the project, compile it, exit the IDE.

Re-open the project in the IDE. Recreate the sub, take your lifted code over in Notepad, and drop it back into the sub.

Save the project, and see if it compiles.

Yes? No? New Error?


Answer from dwirch on 12/6/2011

You might want to check out this link, as well:


Recent Forum Posts

Coding Archive?
dwirch posted on May 25, 2017 at about 12:38 in Site News

BWASL returns
dwirch posted on May 13, 2017 at about 15:24 in Site News

BWASL returns
dwirch posted on May 13, 2017 at about 8:46 in Site News

Job Spammer: Balashankar Bose Bose
dwirch posted on May 11, 2017 at about 10:05 in Spammers

Job Spammer: Bharti Jigyasi
dwirch posted on May 11, 2017 at about 7:58 in Spammers

List of Shady Characters
dwirch posted on April 25, 2017 at about 16:39 in Webmaster Stuff