Hello,
I am having a problem reading an XML document, connecting
it to a dataset, then updating the datasource with the new
information. I am able to use the WriteXml() method to
create the XML document, but I cannot read it properly.
Here's a snippet of the code I used:
DataSet ds = new DataSet();
FileStream file = new FileStream
(filepath.Text,FileMode.Open,FileAccess.Read);
ds.ReadXml("test.xml",
XmlReadMode.ReadSchema);
sqlDataAdapter1.Update(ds);
MessageBox.Show("Import worked!");
file.Close();
this.Hide();
this compiles fine, but it never updates the data source.
I'd really appreciate anyone's help. Thanks!
Sincerely,
Shane