Typed DataSet returned from Web Service missing DataRows

N

Nathan Phelps

I have a typed DataSet that contains approximately eight DataTables with
foreign key relationships that I am returning from a ASMX web service to a
Winforms application. The rows of a few particular tables don't seem to be
making it across the wire.

* I can verify that these particular DataTables are being populated
correctly by their DataAdapters by debugging on the server-side and
verifying that the XML returned from the web service call includes the rows
in question (tested using the test page generated by ASP for the web
service).
* I can verify that the typed DataSet that is generated by adding the
reference to the client project includes the appropriate definition of the
tables in question.

The rows in these tables, however, don't make it across the wire. I can
verify this by calling WriteXml on the returned DataSet and examining the
saved file to find that the rows in question are missing.

I have tried removing the web reference and recreating it, removing all the
foreign key relationships in the DataSet, but I get the same results...

Any ideas?

Thanks,

Nathan
 
V

Val Mazur

Hi Nathan,

Do you return it as a result of the function? If yes, then did you declare
result of the function as DataSet?
 
N

Nathan Phelps

Yes, the typed DataSet is the declared result... i.e.

[WebMethod]
public MyTypedDataSet GetData()
{
MyTypedDataSet ds = new MyTypedDataSet();
MyDataAdapter.Fill(ds);
// Check and see if the suspect data is there
...
// Yes it is there
return ds;
}

And on the client side...

MyTypedDataSet ds = myWebService.GetData();
// Check and see if the suspect data is there
....
// Nope, missing...
// Some tables include all their data, while other tables are completely
empty... I don't get it...
 

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

Top