J
Jeremy
I have a procedure that writes an xml file to disk. When I click my button
and run it once, it replaces the xml file on disk as it should. If I click
the button a 2nd time, it appends. If I leave the app & click the button,
the file is replaced.
I've tried closing and flushing, but no joy. Dispose is not an available
method. Any thoughts?
Here is a snippet (ds is a dataset):
Dim tw As New System.IO.FileStream("filedrive:\path\name.xml",
IO.FileMode.Create)
Dim xw As New XmlTextWriter(tw, System.Text.Encoding.UTF8)
ds.WriteXml(xw, XmlWriteMode.WriteSchema)
xw.close()
Jeremy
and run it once, it replaces the xml file on disk as it should. If I click
the button a 2nd time, it appends. If I leave the app & click the button,
the file is replaced.
I've tried closing and flushing, but no joy. Dispose is not an available
method. Any thoughts?
Here is a snippet (ds is a dataset):
Dim tw As New System.IO.FileStream("filedrive:\path\name.xml",
IO.FileMode.Create)
Dim xw As New XmlTextWriter(tw, System.Text.Encoding.UTF8)
ds.WriteXml(xw, XmlWriteMode.WriteSchema)
xw.close()
Jeremy