Return Strongly Typed Data Set from Web Service

H

HardBap

I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe
tool. I want to be able to access fields using
ds.Customer[0].CompanyName.

The problem is when I return this DataSet from a Web Service it adds
another Table to the DataSet that contains the data. I have to access
the data using ds.Tables[1].Rows[0]["CompanyName"].ToString(). This
defeats the whole purpose of using a strongly typed DataSet.

Thanks in advance for the help.
 
G

Gabriel Lozano-Morán

Are you sure that you aren't converting the typed dataset to an untyped
dataset? I mean do you have a common assembly with the customers typed
dataset and a reference to this common assembly in the provider and
consumer? I could be wrong though.

Gabriel Lozano-Morán
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,132
Latest member
TeresaWcq1
Top