Hi all:
I have a simple app on both a windows app and on a pocket pc app, which
is one form with two textboxes and a button. The button basically
writes the textboxes to a dataset table, and then performs a WriteXML
to a file (partial code is below).
On the Windows App, the form behaves as I would think it behaves, i.e.
every time I fill out new information in the textboxes, it appends a
new row into the datatable and the entire datatable is then written to
the xml file.
On the Pocket PC App, however, when I reset my PDA, the first time I
click submit, it writes the xml to the file, but on subsequent
attempts, the xml file contains only the original xml post, even
between debugging sessions, even when I delete the xml file. The only
way that I can get the app to write the new data is to do a hard reset
of the PDA.
Anybody have any advise? TIA.
private void Form1_Load(object sender, System.EventArgs e)
{
DS1 = new DataSet("Dataset1");
Tab1 = new DataTable("Tab1");
DS1.Tables.Add(Tab1);
Tab1.Columns.Add("t1_pk",typeof(int));
Tab1.Columns.Add("t1_fname",typeof(string));
Tab1.Columns.Add("t1_lname",typeof(string));
Tab1.AcceptChanges();
}
private void button1_Click(object sender, System.EventArgs e)
{
DataRow dr = Tab1.NewRow();
dr["t1_pk"] = 1;
dr["t1_fname"] = text_fname.Text.ToString();
dr["t1_lname"] = text_lname.Text.ToString();
Tab1.Rows.Add(dr);
DS1.WriteXml(str_Directory + "tab1.xml");
}