By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,673 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,673 IT Pros & Developers. It's quick & easy.

Can't read XML document and parse into dataset

P: n/a
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

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.