如果我的,我如何过滤我的组合框显示Label.text ="ad"
,我只想显示那些在数据库中有“广告”并且不应该全部显示的人。但是错误无效参数 = '0' 的值对于 SelectedIndex' 参数名称无效:Selectedindex “出现”。
Private Sub FillCombo()
Try
conn = New OleDbConnection(Get_Constring)
Dim sSQL As String = ("SELECT subject FROM student where subject like'" & Label25.Text & "%' ")
Dim da As New OleDbDataAdapter(sSQL, conn)
Dim ds As New DataSet
da.Fill(ds)
cmbsection.ValueMember = "subject"
cmbsection.DataSource = ds.Tables(0)
cmbsection.SelectedIndex = 0
Catch ex As Exception
MsgBox("ERROR : " & ex.Message.ToString)
End Try
End Sub