T
Tom
Hope this isn't posted twice. The other one disappeared...anyway -
Having trouble getting a particular value to stick with this method. I have
a little XML file to store some data for a .NET Windows application. I use
the WriteSchema method of the dataset I read it into to keep it updated.
In the code below, the text in the textbox txtBase is normally supplied by
the FileName property of an OpenFileDialog component. However, this text
value never will write to the file! If I restart the program and merely
type some text in the textbox, or if I hardcode a string value in the code,
the file is updated correctly.
Anyone know how to make this work??
Dim rwSystem As DataRow = dsSettings.Tables(0).Rows(0)
rwSystem("BaseDirectory") = txtBase.Text
dsSettings.AcceptChanges()
dsSettings.WriteXml("ProgramSettings.xml", XmlWriteMode.WriteSchema)
Having trouble getting a particular value to stick with this method. I have
a little XML file to store some data for a .NET Windows application. I use
the WriteSchema method of the dataset I read it into to keep it updated.
In the code below, the text in the textbox txtBase is normally supplied by
the FileName property of an OpenFileDialog component. However, this text
value never will write to the file! If I restart the program and merely
type some text in the textbox, or if I hardcode a string value in the code,
the file is updated correctly.
Anyone know how to make this work??
Dim rwSystem As DataRow = dsSettings.Tables(0).Rows(0)
rwSystem("BaseDirectory") = txtBase.Text
dsSettings.AcceptChanges()
dsSettings.WriteXml("ProgramSettings.xml", XmlWriteMode.WriteSchema)