把所填写的内容保存到xml文件中去,同时listview显示相同文件中相关记录。但是第一次保存正确,后面就出现系统错误提示:该文件正被另一线程使用。如何解决这样的冲突问题?
Try
savedoc.Load(strXMLReader) '加载XML文档
Catch ex As Exception
MsgBox(ex.Message)
End Try
Try
Dim root As XmlNode = savedoc.DocumentElement ' to get the root node of the XML document
xmlInsert(savedoc, root)
savedoc.Save(strXMLReader)
Catch ex As Exception
MsgBox(ex.Message)
End Try
Read_XML(strXMLReader, lvwPkqsd, i) 'lvwpkqsd为Listview名,显示XML文件内容在listview上