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

webmethod returns dataset

hi,
I'm writing a webmethod to return a dataset using ado.net, the method takes
parameters as follows:
<WebMethod(Description:="This method is used to Get Account Report")> Public
Function GetAccountReport(ByVal businessName As String, ByVal userName As
String, ByVal passWord As String, ByVal sentFromDateTimeText As String,
ByVal sentToDateTimeText As String) As DataSet

the thing is that how do I validate the fields sent over before I send it to
the database, for required fields; correct date time,e tc. and return it?

I need to return meaningful text but not an empty dataset?

is this possible?

Thanks


Nov 23 '05 #1
1 1999
You should throw an exception when the parameters are not valid.

"Inas Hafez" wrote:
hi,
I'm writing a webmethod to return a dataset using ado.net, the method takes
parameters as follows:
<WebMethod(Description:="This method is used to Get Account Report")> Public
Function GetAccountReport(ByVal businessName As String, ByVal userName As
String, ByVal passWord As String, ByVal sentFromDateTimeText As String,
ByVal sentToDateTimeText As String) As DataSet

the thing is that how do I validate the fields sent over before I send it to
the database, for required fields; correct date time,e tc. and return it?

I need to return meaningful text but not an empty dataset?

is this possible?

Thanks


Nov 23 '05 #2

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

Similar topics

0
by: drishtik | last post by:
hi i am trying to update a dataset in my client windows applicaton and then pass that dataset to the web service so that it can update the database.. i have operations like update, delete and...
1
by: John Young | last post by:
Hi, I have a strange problem with returning a dataset from a webservice. Here's some code... The error I get at compile time is. "Cannot convert type 'void' to 'System.Data.DataSet'" Can...
2
by: Peter McEvoy | last post by:
Folks, I've been building a Webservice API for a contract that will be exposed to the internet at large. There are two endpoints, and each endpoint contains a number of webmethods. Every...
1
by: @rturo | last post by:
I have a webservice running and I have a method with a string parameter. The method is quering an xml file but i need to enter the exact letter case in the string to get the right reult otherwise...
2
by: David++ | last post by:
Hello list, I have built a project in VS2005 which includes a Web Service Web Site. On this server there is a Database. I have used the DataSet designer to link to this database and VS2005 has...
0
by: Looch | last post by:
Everytime I call the method below I get the following exception in a vb.net app: 'Unable to cast object of type 'System.Xml.XmlNode' to type 'System.Data.DataSet' I was able to get the same...
0
by: Madeleine | last post by:
HI, I know this thread have been posted before, but i can't find my solution in it. Server side: public DataSet getIndustryDatePostedAnnouncement() { SqlConnection con =...
2
by: John | last post by:
I'm calling the Webmethod from JS and at the end of the function I would like to do a a ListViewBillable.DataBind() in the Webmethod, calling a postback from JS is not rendering the correct...
7
by: kunku | last post by:
Hi, I am using a query "Select SUM(Amount) from tblAccount where TransactionID=' "+textBox1.Text+" ' "; in my C# project this query return dataset.Tables.Rows.Count =1 eventhough there...
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
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
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.