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 7703863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:33:21+00:00 2026-05-31T23:33:21+00:00

I have multiple tables in a mysql database and I am trying to put

  • 0

I have multiple tables in a mysql database and I am trying to put the information from one table into a gridview. That was easy but some of the rows are just the id numbers from other tables. so my row looks like

proposal_Line_Id , proposal_Id, day_Name , proposal_Desc, proposal_Vol , proposal_Vol_Unit, item_Id , product_Id, proposal_Qty , proposal_Discount, proposal_Cost , proposal_Total,

the 2 in bold are number that are the key ID numbers for 2 other tables

***_items and ***_products are the other tables

what i need to do is fill my data table with the names from those so I know its a where statement or a join anyway here is my connection

 string ConnectionString = ConfigurationSettings.AppSettings["ConnectionString"];
 MySqlConnection connection;
 MySqlDataAdapter adapter;







        connection = new MySqlConnection(ConnectionString);

        try
        {
            //prepare query to get all records from items table
            string query = "select * from ***_proposal_line where proposal_Id = " + b + "";



            //prepare adapter to run query
            adapter = new MySqlDataAdapter(query, connection);

            //create a DataTable to hold the query results
            DataTable dTable = new DataTable();


            //get query results in dataset
            adapter.Fill(dTable);

            //set the BindingSource DataSource
             dataGridView1.DataSource = dTable;

        }
        catch (MySqlException ex)
        {


        }
    }

any questions let me know i will try to explain better

Brent

  • 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-31T23:33:22+00:00Added an answer on May 31, 2026 at 11:33 pm

    As far as understand the question, I think you want something like this in query and bind into GridView.

    SELECT 
      pl.proposal_Line_Id,
      pl.proposal_Id,
      pl.day_Name,
      pl.proposal_Desc,
      pl.proposal_Vol,
      pl.proposal_Vol_Unit,
      * * it.ITEMNAME * *,
      * * pd.PRODUCTNAME * *,
      pl.proposal_Qty,
      pl.proposal_Discount,
      pl.proposal_Cost,
      pl.proposal_Total 
    FROM
      * * ? ? ? _proposal_line * * pl,
      * * ? ? ? _items * * it,
      * * ? ? ? _products * * pd 
    WHERE pl.item_id = it.item_id 
      AND pl.product_id = pd.product_id 
      AND pl.proposal_id = 1 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to insert information into multiple tables within a database, i have managed
I have a mysql database table that contains multiple user photos. I am trying
I have a MySQL database with multiple tables, each of which have the same
I have a dataset with multiple tables. One table in particular has one record
After dynamically creating a client-side table based on SELECT information retrieved from MySql database,
i am trying to select information from my mysql database with this statement after
I'm trying to pull multiple rows from different tables in a database. If I
I am trying to export data from my MySQL database to multiple CSV files
I will have multiple tables used by different projects on the same mySql server.
I have multiple columns in a mySQL table. Three of the columns are named

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.