hi

I'm really new to c# but i really don't know how to do this!

well I have a table customer with a customer_no as a primary key. I have a second table named order and it customer_no is one of its primary key. What I want to do is display in one data grid all the contents of the table order and display the first and last name of the customers,w/c are found in the customer table

the thing is..i know the query command but I don't know how to display it to one data grid

I really need help! T_T

oh and by the way..I'm using MS access T_T

>i know the query command but I don't know how to display it to one data grid

Create dataAdapter instance and use its Fill method to populate datatable,

string query="put_your_select_statement_here";
 OleDbDataAdapater adp=new OleDbDataAdapter(query,"put_connection_string_here");
 DataTable dt=new DataTable();
 
 adp.Fill(dt);
 
 dataGridView1.DataSource=dt;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.