overwriting files when saving xml data

JackiTyan

Member
Joined
Oct 4, 2006
Messages
6
Programming Experience
Beginner
Hi! I am doing this school project using XML as source for Crystal Report, the MySQL reference manual tells me that i should, First: Create a Dump of the Table(s) that i want to create a report on to an XML file. Next: I have to link the file to the Report Viewer, and so on.

Now, the problem arises when you already have all the needed XML files written to the disk, and needs to update said files for newly added records. What if this code below fails to write the file, as the file already exists?
Is there an overwrite function that i can call, so the file will be written without warning, or errors (because it already exists)?

VB.NET:
myData.WriteXml("C:\Report_DS.xml", XmlWriteMode.WriteSchema)



Thanks in advance for any and all the help you guys can provide.
 
It overwrites. The WriteXml method overwrites. I tried it several times and it did overwrite every time. Just try and you'll see.
 
Back
Top