這是一個鱈魚,當它做它爲combobox它來了我一個thes消息 我不敢喋喋不休「canot綁定新值member.parameter名稱:值「Winforms combobox canot綁定新值member.parameter name:value
Dim sql3 As String
Dim dt4 As New DataTable
sql3 = "SELECT class.class_name, teacher.first_name, course.cours_name, class.class_char" _
& " FROM class INNER JOIN" _
& " lecture ON class.class_num = lecture.class_num INNER JOIN" _
& " course ON lecture.cours_num = course.cours_num INNER JOIN" _
& " teacher ON lecture.teacher_id = teacher.teacher_id" _
& " WHERE (class.class_name = '" & cbox_class.Text & "') AND(teacher.first_name = '" & cbox_teacher_name.Text & "')"
Dim da5 As New SqlDataAdapter()
da5 = New SqlDataAdapter(sql3, conn)
da5.Fill(dt4)
cbox_cours.DropDownStyle = ComboBoxStyle.DropDownList
cbox_cours.DataSource = dt4
cbox_cours.DisplayMember = "cours_name"
cbox_cours.ValueMember = "cours_num"