DataSet Question

I would like to return a dataset with a couple data-tables out of a webservice and then use it in a client application. How would I return the structure out of the webservice and then consume it in the client windows app?
Who is Participating?
käµfm³d 👽Commented:
You would need to create a function on the web service that returned a DataTable/DataSet. Your client application would have a reference to your web service and thus it would know that the function is returning a DataTable/DataSet and you would capture it as a return value from the function and use it as you would any other code. My syntax might be off a little as I started wrting this in C# ;)
// Your webservice
<OperationContract()> _
Function GetData(string parameter) As System.Data.DataTable
// Your client
Dim webVar As new WebServiceName
Dim dt As System.Data.DataTable
dt = webVar.GetData("some parameter value")

Open in new window

thenrichAuthor Commented:
I was missing setting my funaction on the web service as a dataset
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.