hello.. i have problem load two data from different table and column.. for example, each data from product table into product combobox and brand table to brand combobox..i succussfully load data to combobox but got multiple same data into combobox..
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=" & Application.StartupPath & "\mydatabase.mdb;Jet OLEDB:Database Password=admin;")
Dim cmd As OleDbCommand = New OleDbCommand("SELECT product.productN,brand.brandN FROM product, brand", conn)
conn.Open()
Dim sdr As OleDbDataReader = cmd.ExecuteReader
While sdr.Read()
product.Items.Add(sdr.Item("productN").ToString)
brand.Items.Add(sdr.Item("brandN").ToString)
End While
conn.Close()
End Sub