C
chaudier
I need to update sqlServer Tables from XML files.
I use the code below but nothing is updated in my sqlServer DataBase.
What's wrong with it? (no error occurs)
objDataSetXml = new System.Data.DataSet(fileNameNode.InnerText+"Xml");
objDataSetXml.ReadXml(repImport+"/"+fileNameNode.InnerText+".xml");
objCmd = new System.Data.OleDb.OleDbDataAdapter("select * from
"+tableNameNode.InnerText,objConCnet);
objDataSetCnet = new System.Data.DataSet(tableNameNode.InnerText);
objCmd.Fill(objDataSetCnet);
objDataSetCnet.Merge(objDataSetXml, true);
objDataSetCnet.AcceptChanges();
objCmd.Update();
I use the code below but nothing is updated in my sqlServer DataBase.
What's wrong with it? (no error occurs)
objDataSetXml = new System.Data.DataSet(fileNameNode.InnerText+"Xml");
objDataSetXml.ReadXml(repImport+"/"+fileNameNode.InnerText+".xml");
objCmd = new System.Data.OleDb.OleDbDataAdapter("select * from
"+tableNameNode.InnerText,objConCnet);
objDataSetCnet = new System.Data.DataSet(tableNameNode.InnerText);
objCmd.Fill(objDataSetCnet);
objDataSetCnet.Merge(objDataSetXml, true);
objDataSetCnet.AcceptChanges();
objCmd.Update();