473,803 Members | 3,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error in Code


The Following code generates Error while compiling:

Private Sub datPrimaryRS_Mo veComplete(ByVa l adReason As
ADODB.EventReas onEnum, ByVal pError As ADODB.Error, adStatus As
ADODB.EventStat usEnum, ByVal pRecordset As ADODB.Recordset )
'This will display the current record position for this recordset

datPrimaryRS.Ca ption = "Record: " &
CStr(datPrimary RS.Recordset.Ab solutePosition)
End Sub

The Error Message is:
"Compiler Error:

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

If some one could help tracking the problem
Thanx
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
2 3021
Shailaindra Sharma wrote:
The Following code generates Error while compiling:

Private Sub datPrimaryRS_Mo veComplete(ByVa l adReason As
ADODB.EventReas onEnum, ByVal pError As ADODB.Error, adStatus As
ADODB.EventStat usEnum, ByVal pRecordset As ADODB.Recordset )
'This will display the current record position for this recordset

datPrimaryRS.Ca ption = "Record: " &
CStr(datPrimary RS.Recordset.Ab solutePosition)
End Sub

The Error Message is:
"Compiler Error:

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

If some one could help tracking the problem
Thanx
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


What is datPrimaryRS? Is it a field on your form?
Nov 13 '05 #2
Are you sure this is the only declaration of this procedure you have, do a
search on datPrimaryRS_Mo veComplete in your code.

The declaration you have shown here is correct for an ADO recordset or the
ADO control.

' Recordset declaration
Private Sub datPrimaryRS_Mo veComplete( _
ByVal adReason As ADODB.EventReas onEnum, _
ByVal pError As ADODB.Error, _
adStatus As ADODB.EventStat usEnum, _
ByVal pRecordset As ADODB.Recordset _
)
'
End Sub

' ADO control declaration
Private Sub datPrimaryRS_Mo veComplete( _
ByVal adReason As ADODB.EventReas onEnum, _
ByVal pError As ADODB.Error, _
adStatus As ADODB.EventStat usEnum, _
ByVal pRecordset As ADODB.Recordset _
)
'
End Sub

And matches what is shown in the typelib for msado25.
HRESULT MoveComplete(
[in] EventReasonEnum adReason,
[in] Error* pError,
[in, out] EventStatusEnum * adStatus,
[in] _Recordset* pRecordset);

If you don't have multiple declarations then check the declaration of the
event in the ADO typelib you are referencing (you can do this using
OLEView).
--
Terry Kreft
MVP Microsoft Access
"Shailaindr a Sharma" <sh****@hotmail .com> wrote in message
news:41******** **@127.0.0.1...

The Following code generates Error while compiling:

Private Sub datPrimaryRS_Mo veComplete(ByVa l adReason As
ADODB.EventReas onEnum, ByVal pError As ADODB.Error, adStatus As
ADODB.EventStat usEnum, ByVal pRecordset As ADODB.Recordset )
'This will display the current record position for this recordset

datPrimaryRS.Ca ption = "Record: " &
CStr(datPrimary RS.Recordset.Ab solutePosition)
End Sub

The Error Message is:
"Compiler Error:

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

If some one could help tracking the problem
Thanx
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #3

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

Similar topics

5
16262
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information Server might not be running or the path exists and is redirected to another machine. Please check the status of this virtual directory in the Internet Services Manager."
2
2979
by: Gregory | last post by:
Hi, One of the disadvantages of using error handling with error codes instead of exception handling is that error codes retuned from a function can be forgotten to check thus leading to unexpected run-time problems. Exceptions on the other hand can not be simply ignored. In order to solve this error codes problem I suggest using error object instead of error codes. Each function has to return an error object that stores an error
13
6621
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
6
4763
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
16
2654
by: Steve Jorgensen | last post by:
I'm trying to figure out if there is a way to generate standard error handlers that "know" if the calling code has an error handler in effect (On Error Goto <label> or On Error Resume Next) before deciding how to respond. Does anyone know if this is possible.
6
8470
by: Squirrel | last post by:
I have a command button on a subform to delete a record. The only statement in the subroutine is: DoCmd.RunCommand acCmdDeleteRecord The subform's recordsource is "select * from tblVisit order by VisitDt" I'm getting this error message: Errno is 2465. Err.description is "Can't find field '|' referred to in your expression"
7
5035
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
4
1904
by: Eugene Anthony | last post by:
One problem with the code bellow is after this code conn.qDupUser p1,rs I added: set rs = nothing to test the error handling capability.
2
19496
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
2897
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's words, or maybe, my own words as how I understand them, hoping, you will understand it the same way that...
0
9699
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10542
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10068
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9119
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7600
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5496
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.