* XmlDataDocument.cs: Still need to print tag for the DataSet if there
is no data at all.
svn path=/trunk/mcs/; revision=12458
+2003-03-12 Alan Tam <Tam@SiuLung.com>
+
+ * XmlDataDocument.cs: Still need to print tag for the DataSet if there
+ is no data at all.
+
2003-01-27 Ville Palo <vi64pa@koti.soon.fi>
* ChangeLog: Added this file.
this.dataSet = dataset;
- // Read DataSet in as document if there is data in tables
- bool HaveRows = false;
- foreach (DataTable T in dataSet.Tables) {
+ XmlReader xmlReader = new XmlTextReader (new StringReader (dataSet.GetXml ()));
- if (T.Rows.Count > 0) {
- HaveRows = true;
- break;
- }
- }
-
- if (HaveRows) {
-
- XmlReader xmlReader = new XmlTextReader (new StringReader (dataSet.GetXml ()));
-
- // Load DataSet's xml-data
- base.Load (xmlReader);
- xmlReader.Close ();
- }
+ // Load DataSet's xml-data
+ base.Load (xmlReader);
+ xmlReader.Close ();
foreach (DataTable Table in DataSet.Tables) {