PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Using the "Dataset.Datatable."ReadXML

Reply

Using the "Dataset.Datatable."ReadXML

 
Thread Tools Rate Thread
Old 12-09-2006, 02:12 PM   #1
nachbar
Junior Member
 
Join Date: Sep 2006
Posts: 2
Trader Rating: (0)
Default Using the "Dataset.Datatable."ReadXML


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 by nachbar : 12-09-2006 at 02:13 PM. Reason: editing some code
nachbar is offline   Reply With Quote
Old 15-09-2006, 12:42 PM   #2
nachbar
Junior Member
 
Join Date: Sep 2006
Posts: 2
Trader Rating: (0)
Default no help..ok i've got it by myself

...i found it out.
nachbar is offline   Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off