I have a function that get 3 argument , a textbox and 2 combobox and use them in the code as temp of a OleDbDataReader but I have a problem and take runtime
error: No value given for one or more required parameters.
Sub load_txt_code(ByVal nkala As ComboBox, ByVal ckala As ComboBox, ByVal ghyemat As TextBox)
dr.Close()
cmd.Connection = con
cmd.CommandText = "select name_jens from ajnas where id = " & nkala.Text & ""
dr = cmd.ExecuteReader()
While dr.Read
nkala.Text = dr.Item(0)
End While
'por kardane combobox e gheymat
dr.Close()
cmd.CommandText = "select gheymate_forush from ajnas where id = " & ckala.Text & ""
dr = cmd.ExecuteReader()
While dr.Read
If Not IsDBNull(dr.Item(0)) Then
ghyemat.Text = dr.Item(0)
Else
ghyemat.Text = Nothing
End If
End While
End Sub