473,545 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Updating 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 DataGrid that uses a BindingSource which uses a dataset which
uses 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 record
selected. The user at this point is able to make changes to the record and
they are properly propogated back to the BindingSource. The problem is that
the TableAdapter does not contain the appopriate update, New SQL in order to
perform the update, therefore I am not able to call the TableAdapter.Up date
method with the dataset as I would had I created a tableadapter not using a
join.

How am I best to handle this situation.

Thanks,
Aug 29 '06 #1
4 2960
Rob,

The answer is very simple, the table adapter is build to update one real
table, not a joined datatable.

This needs in my opinion an other approach,

Does not help, however maybe fine to know.

Cor

"Rob Dob" <ro************ @yahoo.comschre ef in bericht
news:uC******** ******@TK2MSFTN GP04.phx.gbl...
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 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 record
selected. The user at this point is able to make changes to the record
and they are properly propogated back to the BindingSource. The problem
is that the TableAdapter does not contain the appopriate update, New SQL
in order to perform the update, therefore I am not able to call the
TableAdapter.Up date method with the dataset as I would had I created a
tableadapter not using a join.

How am I best to handle this situation.

Thanks,

Aug 29 '06 #2
Hi,
The answer is very simple, the table adapter is build to update one real
table, not a joined datatable.

This needs in my opinion an other approach,
I understand this, but is there a way to post the updates of my databound
controls back to my two tables referred to within my bondingsource created
using a join. Basically the reason I'm using a join is that I want to
display both information from the orders table and customer table within my
dataview.

Thanks.
Aug 29 '06 #3
Mel
No, you must save the changes yourself individually to each table without
using the join.

"Rob Dob" <ro************ @yahoo.comwrote in message
news:ub******** ******@TK2MSFTN GP04.phx.gbl...
Hi,
>The answer is very simple, the table adapter is build to update one real
table, not a joined datatable.

This needs in my opinion an other approach,

I understand this, but is there a way to post the updates of my databound
controls back to my two tables referred to within my bondingsource created
using a join. Basically the reason I'm using a join is that I want to
display both information from the orders table and customer table within
my dataview.

Thanks.


Aug 29 '06 #4
Hi,
No, you must save the changes yourself individually to each table without
using the join.
Can I import the contents of fields with matching names from my
bindingsource to the two appropriate dataset that belong to each of my two
tables? What is the recommended approach to doing this?

Or is there a way to maybe display the contents of two different tables
within my one datagridview

Thanks,

Aug 29 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1553
by: Daniel R. Rossnagel | last post by:
To determine from assembly whatever bindingsource has the form that uses this assembly and to obtain a listing of such
5
12499
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 update the datasource - awesome, but I have an issue with updating from a different thread. Here is my datasource, a person class that raises the...
0
4130
by: Geoff | last post by:
Hi folks Calling BindingSource.ResetCurrentItem() is changing the BindingSource.Position in a way I don't understand. If I'm understanding the docs correctly, ResetCurrentItem() should simply trigger an event which causes controls to refresh with the values of the current item with the index BindingSource.Position. This is not what I'm...
3
5126
by: Carlos Cruz | last post by:
Hi, I've a DataGridView with Datasourse = Datatable. The problem is that I can't get my last record updated at the database unless I change the row where I'm editing... Can anyone explain me why and how can I manage to get rid of this? By the way, Im' updating with DataAdapter.Update(DataTable) Thanks in advance
1
4101
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 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...
13
11767
by: Dale Harris | last post by:
I'm getting really strange behaviour where the data source RowState is not being updated to modified in some circumstances. I place my controls on a form, bind them through a BindingSource control to a DataSet. If I don't do anything to the DataSet other than load data normally through TableAdapters everything works fine. If I load a...
2
3300
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 CurrentChanged event of the BindingSource of the combobox to update the textbox. When selecting an item in the combobox or when selecting a row in the grid,...
2
4497
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 identify a customer. Then there is a details view that shows all their specifics. I wanted to keep navigation outside of my view. There is also a
5
4916
by: jehugaleahsa | last post by:
Hello: I am sure this question comes up a lot. I need to disable the controls on my Windows forms so that when the BindingSource is empty some the controls bound to it will be disabled. This will make it clear to the user that they have to create a new item first before they start working. This needs to be an easy process because there...
0
7467
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7756
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5326
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3442
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1879
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.