Getting data from array of DataSet objects returned from web service
Posted
by Sarah Vessels
on Stack Overflow
See other posts from Stack Overflow
or by Sarah Vessels
Published on 2010-04-12T19:25:44Z
Indexed on
2010/04/12
19:32 UTC
Read the original article
Hit count: 397
I have a web service that I want to access when it is added as a web reference to my C# project. A particular method in the web service takes a SQL query string and returns the results of the query as a custom type. When I add the web service reference, the method shows up as returning DataSet[]
instead of the custom type. This is fine provided I can still somehow access the data returned from the query within those DataSet
objects. I ran a particular query that should return 6 rows; I got back a DataSet[]
array with 6 elements. However, when I iterate over those DataSet
objects, none of them has any tables (via the Tables
property on the DataSet
). What gives? Where is my data?
The web service is tested and works when I use it as a data source in a Report Builder 2.0 report. I am able to send an XML SOAP query to the web service and get back XML results containing my data.
© Stack Overflow or respective owner