q; DataSet RowState unchanged

G

Guest

Can anyone help on this? I am using the following code to fill the dataset
and serialize it to a string and pass string to a web service.
In the web service I de-serialize it and do update, however that does not
put data into table because rowState=Unchanged.

Web Service Call:
//daSR.AcceptChangesDuringFill = false;
daSR.Fill(dsSR, "myTable");
dsSR.AcceptChanges();

System.IO.MemoryStream stream = new System.IO.MemoryStream();
dsSR.WriteXml(new System.Xml.XmlTextWriter(stream, null),
XmlWriteMode.DiffGram);
stream.Position = 0;
System.IO.StreamReader sr = new System.IO.StreamReader(stream);
string dataStream = sr.ReadToEnd();
myWS.Service ws = new myWS.Service();
ws.Save(dataStream);

... update dsSR and update to Table


In Web Service:
System.IO.TextReader sr = new System.IO.StringReader(dataStream);
dsWS.ReadXml(sr, XmlReadMode.DiffGram);
taSR.Update(dsWS);
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top