Using the "Dataset.Datatable."ReadXML

Joined
Sep 12, 2006
Messages
2
Reaction score
0
Hello, i need some help.

Within the designer of Visual Studio i generated a DataSet within a Table named "Angebote". The same DataSet is generated in a Desktop Application and in a Compact Framework Application. (The Structure of the Table is available on both devices - Desktop, PPC).

On Desktop i fill the DataTable with Data. And then i use:
Code:
myDaten.Tables["Angebote"].WriteXml(Temp + "\\Angebote.XML");
to write an XML File of the Datatable Angebote.

After i copied the .xml file to PocketPC i try to load the data into the table at the PocketPC Application like:
Code:
  System.IO.FileStream fs = new System.IO.FileStream("\\Angebote.xml",System.IO.FileMode.Open);
 System.Xml.XmlTextReader xr = new System.Xml.XmlTextReader(fs);
  setOfTabellen.Tables["Angebote"].ReadXml(xr);
xr.Close();
  fs.Close();

But nothing happens. No error and the DataTable is still empty. What is wrong?

I tried the following: Empty Dataset and load the xml directly into the dataset with:
Code:
setOfTabellen.ReadXml(xr);
and the Table Angebote exists with all the data. But this is not good, because the databinding of controls i add at design time are lost :(

Thanks a lot for any help.

Nachbar
 
Last edited:

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

Top