repetitive data in combobox selection

Jan 21 2005 6:56 PM
hello, i created an interface that will select data from 2 tables using 2 seperate combobox. the problem is that , my code returned repetitive data....pls refer below for the ist combobox, it shows; cd-r cd-r cd-r cd-r cd-rw cd-rw cd-rw cd-rw for the 2nd combobox - - - same thing happened Could someone help me with my code; Private Sub WTransaksi1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load strSQL = "SELECT DISTINCT Customer_Transaction.Test_DiscName, Customer_Transaction.Date_transaction, Model_Transaction.Model_Name FROM Customer_Transaction, Model_Transaction ORDER BY Customer_Transaction.Test_DiscName, Customer_Transaction.Date_transaction ASC" oledbcon.Open() Dim cmd As New OleDbCommand(strSQL, oledbcon) Dim objreader As OleDbDataReader = cmd.ExecuteReader() Do While objreader.Read() ComboBox1.Items.Add(objreader("Test_DiscName")) ComboBox2.Items.Add(objreader("Model_Name")) Loop oledbcon.Close() Call data_bind() End Sub thanks in advance! bitoy

Answers (2)