Thanks for your help. I do not have a control over web service but they
return dataset via WriteXml. Here is what I am getting when I dump tr to a
string: This is the XML returned by Web service:
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><pTDS
xmlns="http://tempuri.org/pTDS.xsd"><myTable diffgr:id="myTable1"
msdata:rowOrder="0"
diffgr:hasChanges="inserted"><fNum>1064</fNum><fName>c4</fName><dD>ToDB</dD><dR>Nk</dR><ADT>2006-05-23T09:05:13.843-04:00</ADT><AUN>wssa</AUN></myTable><myTable
diffgr:id="myTable2" msdata:rowOrder="1"
diffgr:hasChanges="inserted"><fNum>1065</fNum><fName>t4</fName><dD>ToDB</dD><dR>Nk</dR><ADT>2006-05-23T09:05:28.687-04:00</ADT><AUN>wssa</AUN></myTable></pTDS></diffgr:diffgram>
"Ray Booysen" wrote:
JIM.H. wrote: Hello,
I have this code get xml string from web service and I am trying to insert
it into my table in the SQl server through, it does not give any error but it
does not insret the records too, what is problem?
myWS.myDS ds = new myWS.myDS();
myWS.Service ws = new myWS.Service();
System.IO.TextReader tr = new System.IO.StringReader(ws.LoadTable());
ds.ReadXml(tr, XmlReadMode.DiffGram);
daSR.TableMappings.Add("Table", "myTable");
daSR.Update(ds);
We're going to need to see the code from the webservice and what the
..LoadTable() method does.