Hii
I am working on a WinApp in C# using MS Access as database.
It is difficut for me to explain my problem but let me try... and please have some patience...
I want to fetch some rows from table A, the rows may be 2, 3, or 5 etc.
the data of the rows comes from a master table and I use serial number of the Items to save data in the table. I do this because to save memory and keep the table size as low as possible.
suppose, there are 3 rows with same serial number, I want to fetch all 3 records then accoding to the serial number, fetch the original items from the master table then to display the items in a DataGridView.
The problem is, the first row gets the item name and rest of all displays as serial number.
this is all I can explain... but I have try to explain it by screen shots.
Please see the screen shot...1.the query 2.the tables and output.
I think I have to run two loops but I dont know how to do that.
Please let me know if you want some other information.
Thanks
Mayank Jani

Jefferson S. MottaRank #207 · 11.7K reputationPosted Aug 18, 2018, 1:35 PM EDT
see attach.
Vincent Maverick DuranoRank #238 · 10.3K reputationPosted Aug 17, 2018, 5:39 AM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Aug 17, 2018, 9:28 PM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Aug 18, 2018, 9:19 PM EDT
Mayank JaniRank #2,449 · 575 reputationPosted Aug 19, 2018, 9:34 AM EDT
{
OleDbDataAdapter FindBillItems = new OleDbDataAdapter("Select BillItemName From BillItem Where SrNo=" + dgvBillingDetails.Rows[a].Cells[0].Value, MyConnMas);
DataSet dsFindBillItems = new DataSet();
FindBillItems.Fill(dsFindBillItems);
dgvBillingDetails.Rows[a].Cells[0].Value = (dsFindBillItems.Tables[0].Rows[0].ItemArray[0].ToString());
}