G
Guest
I was working with the sample given for master detail and so far I have:
' Bind the master data connector to the Manual Order table.
_masterBindingSource.DataSource = _dsManualOrder
_masterBindingSource.DataMember =
_dsManualOrder.dtManualOrderItem.TableName
' Bind the details (order discount) data connector to the master
' data connector, using the DataRelation name to filter the
' information in the details table based on the current row
' in the master table.
_detailsBindingSource.DataSource = _masterBindingSource
_detailsBindingSource.DataMember =
_dsManualOrder.dtManualOrderItemDiscount.TableName
The problem is when I set the DataMember for the details (last step above) I
get an exception:
Message = "DataMember property 'dtManualOrderItemDiscount' cannot be found
on the DataSource."
I created some debug code to see what tables were available and:
For Each dt As DataTable In _dsManualOrder.Tables
Debug.WriteLine(dt.TableName)
Next
Yields:
dtManualOrderItem
dtManualOrderItemDiscount
So I guess I am confused as to why the table is not found.
Kevin
' Bind the master data connector to the Manual Order table.
_masterBindingSource.DataSource = _dsManualOrder
_masterBindingSource.DataMember =
_dsManualOrder.dtManualOrderItem.TableName
' Bind the details (order discount) data connector to the master
' data connector, using the DataRelation name to filter the
' information in the details table based on the current row
' in the master table.
_detailsBindingSource.DataSource = _masterBindingSource
_detailsBindingSource.DataMember =
_dsManualOrder.dtManualOrderItemDiscount.TableName
The problem is when I set the DataMember for the details (last step above) I
get an exception:
Message = "DataMember property 'dtManualOrderItemDiscount' cannot be found
on the DataSource."
I created some debug code to see what tables were available and:
For Each dt As DataTable In _dsManualOrder.Tables
Debug.WriteLine(dt.TableName)
Next
Yields:
dtManualOrderItem
dtManualOrderItemDiscount
So I guess I am confused as to why the table is not found.
Kevin