hambakahle
Programmer
I have 2 related tables: tblItem (child) and tblSetItem (master). I am attempting to filter tblSetItem and obtain a related subset from tblItem. Can anyone comment on why an exception is being raised:
"DataMember property 'tblSetItem_tblItem' cannot be found on the DataSource."
I can iterate through the datasource’s parentrelations and find it.
"DataMember property 'tblSetItem_tblItem' cannot be found on the DataSource."
I can iterate through the datasource’s parentrelations and find it.
Code:
Dim dr As DataRelation = DbItemsBEDataSet.Relations("tblSetItem_tblItem")
tblSetItemBindingSource.Filter = "SetID = 28"
If tblSetItemBindingSource.Count > 0 Then
Dim bsItemSetItem As New BindingSource
bsItemSetItem.DataSource = DbItemsBEDataSet.tblItem 'TblItemBindingSource
‘EXCEPTION HERE - DataMember property 'tblSetItem_tblItem' cannot be found on the DataSource.
bsItemSetItem.DataMember = dr.RelationName 'DbItemsBEDataSet.tblItem.ParentRelations.Item("tblSetItem_tblItem").RelationName
MsgBox(bsItemSetItem.Count)
End If