473,835 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a Web Service that calls a SP with optional params

Hi folks

This is just a general question.

Suppose I have a SP that has several params and this includes one optional
param.

If I have all the params as args for the WS, and suppose for a particular
case there is no data in the calling app for the optional param in the SP
(note that there are no optional params for the WS because of SOAP).

Would the following approach work?

For the calling app - have a value for the optional SP param set to a value
that will never happen (eg say 0 for an int datatype that is say a foreign
key).

For the WS - have some code included that would check for that value and
then in the call to the SP - dont include a value for the optional param.

Hope somebody can help. Thanks in advance.

Kind regards

Ross Petersen
Nov 23 '05 #1
2 1206
Yes, it would work.
"Ross" <Ro**@discussio ns.microsoft.co m> wrote in message
news:96******** *************** ***********@mic rosoft.com...
Hi folks

This is just a general question.

Suppose I have a SP that has several params and this includes one optional
param.

If I have all the params as args for the WS, and suppose for a particular
case there is no data in the calling app for the optional param in the SP
(note that there are no optional params for the WS because of SOAP).

Would the following approach work?

For the calling app - have a value for the optional SP param set to a
value
that will never happen (eg say 0 for an int datatype that is say a foreign
key).

For the WS - have some code included that would check for that value and
then in the call to the SP - dont include a value for the optional param.

Hope somebody can help. Thanks in advance.

Kind regards

Ross Petersen

Nov 23 '05 #2
Thanks Sherif

Your blood's worth bottling.

Kind regards

Ross Petersen
"Sherif El-Metainy" wrote:
Yes, it would work.
"Ross" <Ro**@discussio ns.microsoft.co m> wrote in message
news:96******** *************** ***********@mic rosoft.com...
Hi folks

This is just a general question.

Suppose I have a SP that has several params and this includes one optional
param.

If I have all the params as args for the WS, and suppose for a particular
case there is no data in the calling app for the optional param in the SP
(note that there are no optional params for the WS because of SOAP).

Would the following approach work?

For the calling app - have a value for the optional SP param set to a
value
that will never happen (eg say 0 for an int datatype that is say a foreign
key).

For the WS - have some code included that would check for that value and
then in the call to the SP - dont include a value for the optional param.

Hope somebody can help. Thanks in advance.

Kind regards

Ross Petersen


Nov 23 '05 #3

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

Similar topics

20
3133
by: svend | last post by:
I'm messing with some code here... Lets say I have this array: a1 = ; And I apply slice(0) on it, to create a copy: a2 = a1.slice(0); But this isn't a true copy. If I go a1 = 42, and then alert(a2) I will see 42 there too. I'm doubting, but I was
1
4648
by: tonman | last post by:
I'm trying to do some accouting with a .NET web service. I would like to simply log the request and response times for each web service method invocation. The LogRequest function simply INSERTs request data and the LogResponse UPDATES the request data based on the RequestId value. The problem here is timing. It appears that the thread pool is processing these out of order (infrequently). Therefore I do not get the UPDATEs as...
16
4066
by: ad | last post by:
Does C#2.0 support optional parameters like VB.NET: Function MyFunction(Optional ByVal isCenter As Boolean = False)
5
7423
by: Imran Aziz | last post by:
Hello All, I am new to C# , how can I delare parameters to a function as optional, and also how are default values assigned ? consider the function public String myFunc(String thisisOptional, String OptWithDefaultValue) { }
3
4904
by: gregory_may | last post by:
Below is a routine I use for creating log files. It works great on most VB Applications. However, for web services, it needs some help. The problem is I cant reflect properly into a web service to find out where the .DLL is. As is, this code writes a log file ok, but the log file ends up buried directory deep inside the .Net Framework directories. Anyone know how to find the path of a web service .DLL so I can fix this code to write to...
0
1080
by: Gardar | last post by:
I have a Web Service which is invoked through a HTTP GET binding. The Web Method is of the form MyWebMethod(String param1, String param2, String param3, String param4) some of these message params are "optional" in the sense that the client does not need to specify their value when invoking my web service. When the client does a HTTP Get of the from /MyWebService.asmx/MyWebMethod?param1="string1"&param2="string2"&param3="string3",
5
3413
by: clsmith66 | last post by:
I've been asked to find out if a project is possible, but I'm not having much luck finding the information I need, I hope some one can help. I need to see if I can build a windows service on the fly customized to a specific client. Is it possible to run the VS command line tool through another application (VB.NET)? I'm thinking I can run the tools as a process and pass the necessary parameters to the process, but I'm not sure how to go...
2
1509
by: andy6 | last post by:
I have the ods calling the business object. This is the method it is calling public DataTable GetEditManager(string tab, string state, int rows, int pageselected, int nbrpages, string sort, byte sortdir, int totaledits, string userid) { int a = nbrpages; int b = totaledits; if (dtProv == null)
0
9652
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
10523
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...
1
10560
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10233
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
9345
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...
0
5636
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
5804
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4434
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
3993
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.