Cmd.Connection = conn 'open connection to database Cmd.CommandText = "select * from Tabel where filed1= 'ComboBox1.selecteditem'" conn.Open() dr = Cmd.ExecuteReader While dr.Read ComboBox2.Items.Add(dr("filed2").ToString()) End While dr.Close() conn.Close()
Cmd.CommandText = "select * from Tabel where filed1= '" & ComboBox1.selecteditem & "'"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)