S
sonicsoul
Hello,
In my custom control, i am providing serialization / deserialization of
dataset and noticed that, when a dataset table is empty, it will not be
serialized. (no xml is generated for empty tables using ds.GetXml or
ds.WriteXml)
Example:
DataSet ds = GetData();
ds.Tables.Count<enter>
3
ds.Tables[0].Rows.Count<enter>
0
SerializeMyDs( ds );
DeserializeMyDs( ds );
ds.Tables.Count<enter>
2
reason being is that i use ds.WriteXml( stringwriter ) to serialize it.
and that does not show anything for empty tables.
i would like to figure out a way to serialize my dataset so that it is
deserialized complete with empty tables.
In my custom control, i am providing serialization / deserialization of
dataset and noticed that, when a dataset table is empty, it will not be
serialized. (no xml is generated for empty tables using ds.GetXml or
ds.WriteXml)
Example:
DataSet ds = GetData();
ds.Tables.Count<enter>
3
ds.Tables[0].Rows.Count<enter>
0
SerializeMyDs( ds );
DeserializeMyDs( ds );
ds.Tables.Count<enter>
2
reason being is that i use ds.WriteXml( stringwriter ) to serialize it.
and that does not show anything for empty tables.
i would like to figure out a way to serialize my dataset so that it is
deserialized complete with empty tables.