DataSet

System.Data.DataSet _DataSet = new System.Data.DataSet("DataSetName"); _DataSet.Tables.Add("Tablename"); _DataSet.Tables["Tablename"].Merge(SomeOtherDataSet("SELECT * FROM table", "Tablename").Tables[0]); _DataSet.Relations.Add(_DataSet.Tables["Parent"].Columns["ID"], _DataSet.Tables["Child"].Columns["FK_Parent"]) _DataSet.Relations.Add(_DataSet.Tables["Parent"].Columns["ID"], _DataSet.Tables["Child"].Columns["FK_Parent"]).Nested = true; _DataSet.WriteXml(@"C:\Temp\TestXML.xml"); for (int i = 0; i <= _DataSet.Tables["Tablename"].Rows.Count - 1; i += 1) { if (_DataSet.Tables["Tablename"].Rows[i]["ID"].ToString() != "") { string _Text = _DataSet.Tables["Tablename"].Rows[i]["Text"].ToString(); } } foreach (System.Data.DataTable _DataTable in _DataSet.Tables) { foreach (System.Data.DataRow _DataRow in _DataTable.Rows) [...]

Von |2015-06-13T22:52:02+00:00Juni 10th, 2015|Kommentare deaktiviert für DataSet