473,403 Members | 2,366 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

VB hates its own event proc syntax???

I have a simple form with, among other things, an ADODC data control (called
"Adodc1"). The ADO connection to the database tests fine but when I try to add
code to any of the Adodc1 control's event procs and then run the app I get a
compiler error:

"Procedure declaration does not match description of event or procedure having
the same name."

On clicking Help for the error it says:

"Procedure has the same name as an event but does not have the same signature
(the number and types of parameters)."

IMO, this is pretty weird since it was VB6 that generated the freekin' event
proc declaration in the first place; in the code window when I selected the
event in the drop down box. Its like VB6 doesn't like its own generated
procedure syntax. I looked up the event proc declaration in MSDN and it's
identical to what VB is generating. I tried this with several of the Adodc1
events and all give me the same error. Event procs for the other form controls
work fine.

Now - show me how stupid I am (cause I know it's some idiotic deal on my part).

Perion
Jul 17 '05 #1
4 8401

"Perion" <Ra******@hotmail.com> skrev i en meddelelse
news:0r********************@comcast.com...
Now - show me how stupid I am (cause I know it's some idiotic

deal on my part).

Show your code....
--
/\ preben nielsen
\/\ pr**@post.tele.dk
Jul 17 '05 #2
It sounds like you accidentally named one of your own
functions with the same name as a control event and VB
is complaining because your parameters don't match the
event parameters. Isn't VB pointing out which one it is
when you crash?

--
--
Perion <Ra******@hotmail.com> wrote in message
news:0r********************@comcast.com...
I have a simple form with, among other things, an ADODC data control (called "Adodc1"). The ADO connection to the database tests fine but when I try to add code to any of the Adodc1 control's event procs and then run the app I get a compiler error:

"Procedure declaration does not match description of event or procedure having the same name."

On clicking Help for the error it says:

"Procedure has the same name as an event but does not have the same signature (the number and types of parameters)."

IMO, this is pretty weird since it was VB6 that generated the freekin' event proc declaration in the first place; in the code window when I selected the event in the drop down box. Its like VB6 doesn't like its own generated
procedure syntax. I looked up the event proc declaration in MSDN and it's
identical to what VB is generating. I tried this with several of the Adodc1 events and all give me the same error. Event procs for the other form controls work fine.

Now - show me how stupid I am (cause I know it's some idiotic deal on my part).
Perion

Jul 17 '05 #3
"Perion" <Ra******@hotmail.com> wrote in message news:<0r********************@comcast.com>...
I have a simple form with, among other things, an ADODC data control (called
"Adodc1"). The ADO connection to the database tests fine but when I try to add
code to any of the Adodc1 control's event procs and then run the app I get a
compiler error:

"Procedure declaration does not match description of event or procedure having
the same name."


somewhere along the line with ADO the event procedures definitions
were changed. Adding the ADODC adds a reference to ADO 2.0 (if I
remember correctly - I haven't used the control in years and then it
was only to play with it). The first thing I'd do is check project /
references and ensure you have only one ADO version checked.

Once that is set, find one of the event procedures and change the name
in the code (just append an X or something like that to the procedure
name). Then re-select the control and the event from the drop-downs
and let VB create a new event template and compare the argument lists.
You may be able to just move your code from the old procedure to the
new one and then delete the old one.
Jul 17 '05 #4
Thanx Bob. I found the solution to this somewhat by accident and you were pretty
close. Upgrading to MDAC 2.8 and installing Visual Studio SP6 solved the
problem. The culprit (I think) was the flaky nature of the ADODC control in ADO
2.0. Now the reference is set to ADO 2.5 and everything works.

Actually, I'm only using that ADODC control as a demo - ordinarily I have no use
for it. It just surprised me when I tried to use it and the problem that arose.

For reference in case anyone else ever encounters this problem - the downloads
for MDAC 2.8 and Visual Studio SP6 are at:
http://msdn.microsoft.com/data/downl...s/default.aspx

Thanks again to all for the replies.

Regards,
Perion
"Bob Butler" <bu*******@earthlink.net> wrote in message
news:fa*************************@posting.google.co m...
"Perion" <Ra******@hotmail.com> wrote in message

news:<0r********************@comcast.com>...
I have a simple form with, among other things, an ADODC data control (called
"Adodc1"). The ADO connection to the database tests fine but when I try to add code to any of the Adodc1 control's event procs and then run the app I get a
compiler error:

"Procedure declaration does not match description of event or procedure having the same name."


somewhere along the line with ADO the event procedures definitions
were changed. Adding the ADODC adds a reference to ADO 2.0 (if I
remember correctly - I haven't used the control in years and then it
was only to play with it). The first thing I'd do is check project /
references and ensure you have only one ADO version checked.

Once that is set, find one of the event procedures and change the name
in the code (just append an X or something like that to the procedure
name). Then re-select the control and the event from the drop-downs
and let VB create a new event template and compare the argument lists.
You may be able to just move your code from the old procedure to the
new one and then delete the old one.

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Derrick D. Daugherty | last post by:
ehlo all I'm trying to compile an app over from sol26 to a recent debian x86 system and I'm not having much luck with getting the precompiler to build some logic we require. I've seen posts...
2
by: E.N. | last post by:
Hi For testing & developing I try to create a stored proc using the mysql query tool. But it complains about syntax. I've tried to see what help and other samples could return but they do not...
1
by: droope | last post by:
I am trying to create a proc with a parm @whereclause that will have a value passed in of one to many policy ids. The parm coming into the proc looks like this, ('000000000108', '000000000106',...
3
by: hikums | last post by:
I dropped the db2detaildeadlock event monitor without flushing the events that were full hoping dropping it will clear the messages also. I now understand this is a default monitor that I should...
14
by: aaron kempf | last post by:
I find that ADP does not support any Stored Procedures that use the 'CREATE PROC spHAPPY' syntax. CREATE PROC syntax is listed in books online. This syntax should be supported Here is a...
3
by: Tom | last post by:
Dear experts, this time my problem is, that I will have objects of 3 different classes, which all should receive their events without knowing each other. In real life the following happens: ...
0
by: Vince | last post by:
Hi, I wrote a windows service with a socket that receives files and once a file has been received it tries to execute it. My problem comes from execution because nothing happens. I have...
3
by: Groove | last post by:
This might be fairly easy to do. Hopefully, it is. (asp.net 2 / vb) I have a Drop Down List and in th code-behind vb file, I'd like to optionally add a OnSelectedIndexChanged attribute to it....
1
by: WebNewbie | last post by:
Hi, I am new to using mysql and there isn't any tutorials online on that shows how to create mysql stored procedure for paging purposes. Thus, I read tutorials on creating stored proc that were...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.