Discussion Locked

ADOdc data Control Error

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have finish my program in VB and I use ADOdc Control with Acces Database and it was working but now when i start my program (source) it's stop in this line
Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset

and it's giving this error :
procedure declaration does not match description of event or procedure having the same name
so what is the problem and how cani fix this problem
thanks for your help

6 replies

by madestroitsolutions

Well, don't trouble yourself anymore my friend.... let me guess, you used the Data form Wizard right? he he he, this is a common problem, and I have experienced it myself before. Funniest of all, sometimes it works, and sometimes it doesnt!, In anyevent, here is the problem: You see, the wizard is referencing an outdated version of the ActiveX library, so what you do, is go to Menu:

PROJECTS > REFERENCES.....

This will open the references window. You will have the selected checkboxes ontop of the list. One of them is: Microsoft ActiveX Data Objects 2.x Library. You have to unchecked this one, and scroll down on the list untill you find similar listings, with different version number. Choose the latest one, In my case it was "Microsoft ActiveX Data Objects 2.7 library. You might have a different version depending on your operating system. What matters is that you choose a higher version. After you select it, click ok, Run your program and have some fun!

Good luck!

by sl-campbell

You may need to download a newer version of MDAC from www.microsoft.com/data/, and then, as sain above, remove the reference to the Microsoft ActiveX Data Objects 2.0 library and instead reference the one with version 2.6/7. Open a Module and then you will see the menu point under extras where you can reference the correct one.

Also, another solution is if you do not use the methods that the compile error is happening on, just remove them.....

by sl-campbell

Forgot: you can also reference the ADO 2.5 as well and it will work. But if you download the MDAC 2.6 or 2.7 you will also need to download from the same site the Jet 4.0 sp, because starting with MDAC 2.6, it is no longer included (in 2.5 it is included though)

This discussion is closed to new replies.