Hi,
I have a datagridview.An d as per my requirement the data is supposed to be filled from three different tables in database.I have created the query and is succesfully able to populated the data in it with the cross join.
Have a look at my structure.
Table1,Table2,T able3.
table1 has 2 records.
Table2 has 7 records.
and Table 3 has 15 records.
Below is my code that reads data from Cross Join Query
It is giving me duplicate records.Please give me logic to do it correctly.
I have a datagridview.An d as per my requirement the data is supposed to be filled from three different tables in database.I have created the query and is succesfully able to populated the data in it with the cross join.
Have a look at my structure.
Table1,Table2,T able3.
table1 has 2 records.
Table2 has 7 records.
and Table 3 has 15 records.
Below is my code that reads data from Cross Join Query
Code:
If dr.HasRows Then While dr.Read combo1.Items.Add(dr(0)) combo2.Items.Add(dr(1)) combo3.Items.Add(dr(2)) End While End If my query strquery="Select Table1.Column1,Table2.Column1, Table3.Column1 from Table1 cross join Table2 cross join table3"
Comment