我使用Dataset.WriteXML()
将XML文件写入Windows-CE的SD卡。大部分时间都是正确的,但有时我会收到错误:
Error Time:7/25/12 1:17:07 PM Message: Details:
System.IO.IOException: IOException
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.FileStream.Write(Byte[] array, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Write(Char value)
at System.Xml.XmlTextWriter.InternalWriteEndElement(Boolean longFormat)
at System.Xml.XmlTextWriter.WriteEndElement()
at System.Data.DataTextWriter.WriteEndElement()
at System.Data.XmlDataTreeWriter.XmlDataRowWriter(DataRow row, String encodedTableName)
at System.Data.XmlDataTreeWriter.Save(XmlWriter xw, Boolean writeSchema)
at System.Data.DataSet.WriteXml(String fileName, XmlWriteMode mode)