When writing DataSet to disk

  • Thread starter Thread starter Chris Botha
  • Start date Start date
C

Chris Botha

I'm using theDataSet.WriteXml(...) to write the DataSet to disk. After
that, when I read the DataSet from disk (theDataSet.ReadXml), then if there
were tables with no records, they are gone. Same for table columns that
contained only null values, not there any more either.

Thanks for any pointers.
 
This is what it does. Check for properties or overloads of WriteXml to see
if anything can change it. It may be that you are stuck with this.
 
Problem is the DataSet is generated on the fly, depending on parameters it
has different tables, coming from different databases.
 
WriteXmlSchema does what it says, it writes the schema, no data.
However using theDataSet.WriteXml(fileName, XmlWriteMode.WriteSchema) does
the job.

Thanks.
 
Back
Top