Last post Nov 25, 2010 09:52 AM by chinis
Dec 14, 2007 08:46 AM|akkeee|LINK
hi i am facing a exception when i try to remove the relation from my dataset
first i create the relation like this
' after declaration and filling the dataset named ds
ds.Relations.Add("R1", ds.Tables!tblTable1.Columns!clmKey, ds.Tables!tblTable2.Columns!clmKey)
'some code that is needed..............
ds.Tables.Remove(ds.Tables("tblTable2")) 'Exception come on this line
i want to remove 2nd table from the dataset but it throwing a exception
Exception = Cannot remove table tblTable2, because it referenced in ForeignKeyConstraint R1. Remove the constraint first.
Not getting what to do.....[:|]
Dec 14, 2007 11:52 PM|akkeee|LINK
i have got the solution before removing the table and after removing the relation we
have to reomve ForeignKeyConstraint R1 Like this
Nov 25, 2010 09:52 AM|chinis|LINK
Thank u!!! :D