DataSet.GetXml() removes unused columns

  • Thread starter Thread starter C. Vollmer
  • Start date Start date
C

C. Vollmer

Hello,

I just wanted to ask if it is expected behavior, that unused columns get
removed in the string that I get from DataSet.GetXml(). So, when I
reload from that XML, I have to check for myself if all columns are
available?
Thanks,
Christoph
 
Christoph,

Correct, this is by design. There's no point to waste space saving data you
do not have, is there?

If you need to restore DataSet structure, you should use schema.
Loading saved schema will restore all tables, columns and relations in the
DataSet even if no data present in the DataSet at all.
Using schema will also improve performance and will preserve column type
information which is lost in inference process you're currently using.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
Back
Top