Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 307265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:32:34+00:00 2026-05-12T07:32:34+00:00

I have created a dataset and in the designer I have created the relations

  • 0

I have created a dataset and in the designer I have created the relations and foreign keys that exist in the database.
Basically, I have a product that has a relationship to a table of prices. The keyfield they share is IdProduct in the Prices table. In the Fill/Get of the product I return the Price field.

I also have a DataGrid that uses a BindingSource which uses this 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, therefore I am not able to call the TableAdapter.Update method with the dataset as I would had I created a tableadapter not using a join.

How am I best to handle this situation.

At the same time I cannot get any modified row:

       dTiendasDs.ProductosDataTable modified = (dTiendasDs.ProductosDataTable)
dTiendasDs.Productos.GetChanges(DataRowState.Modified);

modified is always null

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:32:35+00:00Added an answer on May 12, 2026 at 7:32 am

    I haven’t found a solution that pleases me utterly.

    I don’t know how to make the update method in one, so that my two tables that are "joined" (inner join) in the dataset, update simultaneously.

    I had the problem that even if the controls were databound to productosBindingSource, this bindingSource did not update, so my final solution was to use the row of the dataset directly, and then update the tables of products and prices separately. It is annoying, I hoped to have a unique update.

    My code finally is the following.

    this.productosBindingSource.EndEdit();

            dTiendasDs.Productos[0].idZona =
    

    Convert.ToInt32(zonasCombobox.SelectedValue);

            dTiendasDs.Productos[0].Precio =
    

    Convert.ToDouble(this.precioTextBox.Text);

            dTiendasDs.Productos[0].EndEdit();
           
    
            if (dTiendasDs.HasChanges())
            {
                this.productosTableAdapter.UpdateData(dTiendasDs.Productos[0]["nombre"].ToString(),
                    Convert.ToInt32(dTiendasDs.Productos[0]["idZona"]),Convert.ToInt32(dTiendasDs.Productos[0]["idProducto"]));
    
                this.preciosTableAdapter.UpdateData(
                    Convert.ToInt32(dTiendasDs.Productos[0]["idProducto"]),
                    Convert.ToDouble(dTiendasDs.Productos[0]["precio"]),IdTienda);
            }
    
            this.dTiendasDs.AcceptChanges();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strongly typed DataTable created with the VS2005/VS2008 DataSet designer. The table
I created a strongly-typed dataset in the dataset designer. The DataSet has a Table
i have a sql database, and have created a dataset for a sample table
I have created a strongly typed dataset in the VS 2005 Dataset Designer. There
I have created a script that reads from a CSV (or other dataset, but
I have a DataSet Designer in my project. One of my generated datasets has
I have a typed dataset with 2 datatables, TableX and TableY. Created in designer.
So I have a typed dataset that I have created records for from another
I have created a dataset with the C# designer following this tutorial http://www.devx.com/dotnet/Article/28678/1954 ;
I have a RDLC file with a dataset Created in the designer and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.