DataSet XML export is empty

Posted by Shaine on Stack Overflow See other posts from Stack Overflow or by Shaine
Published on 2010-05-21T06:14:10Z Indexed on 2010/05/21 6:20 UTC
Read the original article Hit count: 168

Filed under:
|
|

I've got in-memory dataset with couple of tables that is populated in code. Data-bound grids on the gui show table contents without a problem.

Then I try to export the dataset into XML:

ds.WriteXml(fdSave.FileName, XmlWriteMode.WriteSchema);

and get empty XML (with couple of lines regarding dataset names but without any tables)

If I export table directly I've got all the data but dataset name is obviously wrong:

ds.Fields.WriteXml(fdSave.FileName, XmlWriteMode.WriteSchema);

What am I missing? Is there any reasonable way to write the whole dataset into file?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about c#