473,774 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(Or gID As String) As
String'."
Here's the client calling code:

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

Here's the web service code:

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

_____
DC G
Nov 19 '05 #1
3 1535
"DC Gringo" <dc******@visio ntechnology.net > wrote in news:O8dXUcrnFH A.708
@TK2MSFTNGP09.p hx.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(Or gID As String) As
String'."
Here's the client calling code:

Dim sFeed As String = oWs.FewsArticle s(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********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Lucas,

Yes I tried that and to no avail.

More suggestions? Anyone?

Thanks!
_____
DC G

"Lucas Tam" <RE********@rog ers.com> wrote in message
news:Xn******** *************** ****@127.0.0.1. ..
"DC Gringo" <dc******@visio ntechnology.net > wrote in news:O8dXUcrnFH A.708
@TK2MSFTNGP09.p hx.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(Or gID As String) As
String'."
Here's the client calling code:

Dim sFeed As String = oWs.FewsArticle s(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********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '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******@visio ntechnology.net > wrote in message
news:O8******** *****@TK2MSFTNG P09.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(Or gID As String) As
String'."
Here's the client calling code:

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

Here's the web service code:

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

_____
DC G

Nov 19 '05 #4

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

Similar topics

5
7191
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 Service in MMC. Is there any way to get arguments using this option? If possible, what framework method should I use to get an arguement? Thanks in advance. Eric
11
2617
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
11071
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) modHandler.rptOpen (Me.Report.Name), (Me.Tag) End Sub
3
4787
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 arrTBL(Optional ByVal DataSetName As String = "") As String(,) Dim DSN As String = DataSetName
3
1597
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 _c;
0
2373
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" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %> <MM:DataSet id="SSF2Pinky"
2
2495
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); void funcY(int i, int j,char *name);
4
1135
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 MsgBox(MyFunc.Arguments(1).Value) MsgBox(MyFunc.Arguments(2).Value)
7
3224
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 bastard so posting it before I forgot again... By taking this minimum code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head>
2
12553
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 illustrate this point, I'll use a fictitious Function called fCalculateInterest() which accepts 3 Arguments (Currency, Single, and Long) and returns a value of type Currency. Public Function fCalculateInterest(curPrincipal As Currency, sngRate As Single,...
0
9454
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
10267
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
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8939
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
7463
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
5355
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
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
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.