SqlConnection con = new SqlConnection(@"Data Source = M2\SQL2016; Initial Catalog = inventoryDB; Integrated Security = True");
SqlDataAdapter sda = new SqlDataAdapter(@"select brnDB.catname, catDB.hsncode, brnDB.compname, itemDB.fullname, companyDB.compcode from brnDB cross join itemDB cross join companyDB cross join catDB where catDB.catname=brnDB.catname and companyDB.compcode=2 order by fullname asc", con);
DataTable dt = new DataTable();
sda.Fill(dt);
dataGridView1.Rows.Clear();
dataGridView1.DataSource = dt;
I run this code, data is coming but multipul times (repeating more than 12 times)