DataSet ds = new DataSet();
System.IO.StringReader xmlSR = new System.IO.StringReader(xml);
ds.ReadXml(xmlSR);
DataTable dtIItems = new DataTable();
DataTable dtHotelInformation = new DataTable();
dtIItems = ds.Tables[30];
dtHotelInformation = ds.Tables[51];
DataColumn DCHotelImage = dtHotelInformation.Columns[2];
var Items = dtIItems;
Items.Columns.Add(DCHotelImage.ColumnName,DRHotelImage.DataType);
When I add a column from another DataTable, this runtime error message returns
You cannot add a nested relation or element column to the table containing the SimpleContent column.
Note . I canβt change anything in xml files because it is provided by third-party
source
share