473,404 Members | 2,195 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,404 software developers and data experts.

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 1187
Yes, it would work.
"Ross" <Ro**@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.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**@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.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
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...
1
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...
16
by: ad | last post by:
Does C#2.0 support optional parameters like VB.NET: Function MyFunction(Optional ByVal isCenter As Boolean = False)
5
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,...
3
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...
0
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...
5
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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,...
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.