I have a Winform to display the contents of two related data tables, EquipReq (the parent) and EqReqItems (the child).
After filling a new data set (DS) with both tables, I add a relation to the data set as follows:
DS.Relations.Add("RItems", DS.Tables("EquipReq").Columns("RecID"), DS.Tables("EqReqItems").Columns("ReqNo"), False)
I bind a new binding source BS as follows:
Dim BS As New BindingSource
BS.DataSource = DS
BS.DataMember = "EquipReq"
I (try) to bind another new binding source BSI as to the added relation RItems as follows:
Dim BSI As New BindingSource
BSI.DataSource = DS
BSI.DataMember = "RItems"
At this last line, I get the error "Data member 'RItems' cannot be found in the data source".
I have iterated through the relations of the data set DS and only one is shown with the name of RItems. I have also double-checked each data table to ensure the named columns in the relation exist in those tables.
Am I overlooking something obvious? What can I do to resolve this issue?
TIA,
Larry