473,386 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Updating multiple Tables via a BindingSource that uses a Join!

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
1 4081
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert Stearns | last post by:
I loaded a flat file into an SQL table and verified the data. Now I want to move the data from the input table to the real table. I thought to use a SQL statement like: update is2.animals t1...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
5
by: Mark R. Dawson | last post by:
Hi all, I may be missing something with how databinding works but I have bound a datasource to a control and everything is great, the control updates to reflect the state of my datasource when I...
4
by: Rob Dob | last post by:
Hi, I have both a Customer and a Orders Table, the key field is CustomerID. I also have a DataGrid that uses a BindingSource which uses a dataset which uses a join between the Customers table...
1
by: davidevan | last post by:
What I'm trying to do is set a players division according to their age. So if age is 8, update division to junior, if age is 9, update division to medium, if age is 10, update division to pee wee,...
33
by: bill | last post by:
In an application I am writing the user can define a series of steps to be followed. I save them in a sql database using the field "order" (a smallint) as the primary key. (there are in the range...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
2
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the...
2
by: jehugaleahsa | last post by:
Hello: I'm working on improving some of our Windows Forms. I have created two user controls that I want to bind to the same BindingSource. I have an overview control that is used just to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.