I'm experiencing a little problem here with my code:
DataSet _ds = new DataSet();
//convert xml to dataset
_ds.ReadXml(textBox1.Text);
try
{
//Create a relation between the Authors and the Titles tables.
_ds.Relations.Add("Level", _ds.Tables["HEADER"].Columns["IDMAT"], _ds.Tables["ITEM"].Columns["IDNRK"]);
}
catch(DataException dt)
{
util.logThis("ERROR while Adding Dataset Relations between tables / UI / ProcessClick event : " + dt.ToString(), "error");
}
Exception System.ArgumentException was thrown in debuggee:
This constraint cannot be enabled as not all values have corresponding parent values.
By default there is no constraint set...so i was wandering what was going wrong?