468,549 Members | 2,218 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,549 developers. It's quick & easy.

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 1906
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by drishtik | last post: by
1 post views Thread by John Young | last post: by
reply views Thread by Looch | last post: by
2 posts views Thread by John | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.