473,395 Members | 1,516 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,395 software developers and data experts.

too many arguments in public function?

I have a simple function within a web method. It works fine with one
parameter, but gives me a compile error when I try to add a second:

"Too many arguments to 'Public Function FewsArticles(OrgID As String) As
String'."
Here's the client calling code:

Dim sFeed As String = oWs.FewsArticles(OrgID, FeedType)

Here's the web service code:

<WebMethod()> _
Public Function FewsArticles(ByVal OrgID As String, ByVal FeedType As
String) As String

_____
DC G
Nov 23 '05 #1
3 5314
"DC Gringo" <dc******@visiontechnology.net> wrote in news:O8dXUcrnFHA.708
@TK2MSFTNGP09.phx.gbl:
I have a simple function within a web method. It works fine with one
parameter, but gives me a compile error when I try to add a second:

"Too many arguments to 'Public Function FewsArticles(OrgID As String) As
String'."
Here's the client calling code:

Dim sFeed As String = oWs.FewsArticles(OrgID, FeedType)


You might have to refresh your web service definition.

Right click on your Web Reference and choose the refresh option.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 23 '05 #2
Lucas,

Yes I tried that and to no avail.

More suggestions? Anyone?

Thanks!
_____
DC G

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@127.0.0.1...
"DC Gringo" <dc******@visiontechnology.net> wrote in news:O8dXUcrnFHA.708
@TK2MSFTNGP09.phx.gbl:
I have a simple function within a web method. It works fine with one
parameter, but gives me a compile error when I try to add a second:

"Too many arguments to 'Public Function FewsArticles(OrgID As String) As
String'."
Here's the client calling code:

Dim sFeed As String = oWs.FewsArticles(OrgID, FeedType)


You might have to refresh your web service definition.

Right click on your Web Reference and choose the refresh option.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 23 '05 #3
web methods do not support overloading parameters. if you need two method
names. if you look in the proxy code, you will see the name assigned to the
overloaded method

-- bruce (sqlwork.com)


"DC Gringo" <dc******@visiontechnology.net> wrote in message
news:O8*************@TK2MSFTNGP09.phx.gbl...
I have a simple function within a web method. It works fine with one
parameter, but gives me a compile error when I try to add a second:

"Too many arguments to 'Public Function FewsArticles(OrgID As String) As
String'."
Here's the client calling code:

Dim sFeed As String = oWs.FewsArticles(OrgID, FeedType)

Here's the web service code:

<WebMethod()> _
Public Function FewsArticles(ByVal OrgID As String, ByVal FeedType As
String) As String

_____
DC G

Nov 23 '05 #4

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

Similar topics

5
by: Eric Chong | last post by:
I created a Windows Service in C# that requires to get passed command arguments like a Console App. I noticed that there is an option "Start parameters" text box in the property of a Windows...
11
by: The Directive | last post by:
This code will not compiled: In main function: Dot temp = new Dot( *(new Point( 5, 5 )) ); In Dot class: //Constructor with default arguments. Dot::Dot( Point& point= *(new Point( 5, 5...
5
by: deko | last post by:
I'd like to use a bit of code in the OnOpen event of a report: =rptOpen(Me.ReportName), (Me.Tag) --this doesn't work This does work: Private Sub Report_Open(Cancel As Integer)...
3
by: Winshent | last post by:
I want to pass optional arguments to build up varios strings, is this possible? look at arrTBL(1,3) in the code below: =========================================== Public Function...
3
by: KK | last post by:
Hello all, I have several classes binded by one common interface - say 'sum' interface which calculates the sum of all the class elements of type 'int'. class Alphabet { int _a; int _b; int...
0
by: bcobra | last post by:
What am I doing wrong? the code: age Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %> <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"...
2
by: prasanthag | last post by:
Hi, I am a newbie to this group. I have a problem in handling the variable arguments passed to a function. My requirement is like this. I have 2 functions say, void funcX(int i, int j);...
4
by: Brian Tkatch | last post by:
Is there a way to reference an argument to a function without using its name? Something like: Public Function MyFunc(ByVal Arg1 As String, ByVal Arg2 As String) As String ...
7
by: VK | last post by:
I was getting this effect N times but each time I was in rush to just make it work, and later I coudn't recall anymore what was the original state I was working around. This time I nailed the...
2
ADezii
by: ADezii | last post by:
When a call is made to a Sub or Function Procedure, you can supply Arguments in the exact order they appear in the Procedure's definition, or you can supply them in any position by name. To...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
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...

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.