Updating multiple Tables via a BindingSource that uses a Join!

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
 
C

cjard

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top