Hi,
I have created a data relation between 2 tables and everything works ok but when I click on a button to reload the form I get datarealtion error dataset relation already exists.
is there any way to test if data relation already exist before assigning it...code is as follows;
I have created a data relation between 2 tables and everything works ok but when I click on a button to reload the form I get datarealtion error dataset relation already exists.
is there any way to test if data relation already exist before assigning it...code is as follows;
VB.NET:
relation = New DataRelation("RelPayPeriod", ds.Tables("VwHHHoursAL").Columns("PayPeriod"), ds.Tables("VwHHWorkedHours").Columns("PayPeriod"), False)
Me.ds.Relations.Add(relation)
bs2.DataSource = bs1
bs2.DataMember = "RelPayPeriod"
Me.BindingNavigator2.BindingSource = bs2