By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Updating multiple Tables via a BindingSource that uses a Join!

P: n/a
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
Aug 29 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
Rob Dob wrote:
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
Sep 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.