Updating multiple Tables via a BindingSource that uses a Join!

  • Thread starter Thread starter Rob Dob
  • Start date Start date
R

Rob Dob

Hi,
I have both a Customer and a Orders Table, the key field is CustomerID. I
also have a DataGridView that uses a BindingSource created using a join
between the Customers table and the Orders table. Everything displays
correctly and when I double click on a row within the datagrid I then open
up a tabbed form that contains a detailed view of the bindingsource record
selected ( which was created using a join ). The user at this point is able
to make changes to the databound controls and they are properly propogated
back to the BindingSource. The problem is that the becuase I created the
TableAdapter using a join an appropriate update, insert, delete method was
never created. I need to be able to post back updates to both the Orders
Table and the Customer Table.



Any help, suggestions would be greatly appreciated

Thanks
 
Write an updatable join, and write the update query yourself..

Or do it using 2 separate Update commands, or even 2 separate
datatables and a datarelation.

Of the approaches, I favour NOT making datatables out of sql joins if
they are to be updated.. make 2 separate tables and update the records
in a transaction.
 
Back
Top