2
votes

I am using Typed DataSet and WCF Service. When I call Update method on WCF proxy method by adding new row in DataTable, I get DataTable with one row in Service method. This is working as expected.

However, when I call same Update method on WCF proxy by updating row in DataTable, I get empty DataTable in Service method. I checked proxy Update method and verified that before calling service method, DataTable has the modified row with row version as "Modified".

I am not able to find out why I am getting empty datatable in service method even if proxy client is sending DataTable with one row to Service. Interesting thing is Service method receives data when same Update method on WCF proxy method is called by adding new row.

Here is the way I am calling Service for updating row.

ServiceClient client = new ServiceClient();
MyDataSet dataSet = client.GetContactByContactId(contactId);
MyDataSet.MyDataTable contactTable = MyDataSet.MyDataTable;
MyDataSet.ContactTableRow row = contactTable[0];
row.FirstName = "ABC";
return client.UpdateContact(contactTable);
1
Can you show the definition of UpdateContact method ?AYK

1 Answers

0
votes

I don't know the answer and the behavior is strange when the method returns a DataSet but the idea is bad: Returning DataSets from WebServices is the Spawn of Satan and Represents All That Is Truly Evil in the World