السلام عليكم ورحمة الله وبركاتة
عندي في مشروع التخرج في صفحة تسجيل الدخول دائما خطا executereaderفي فشوفوا الكود ونبهوني على خطاي و مشكورين
Dim b As Integer
b = TextBox2.Text
a = CInt(ComboBox1.SelectedValue)
s = ComboBox1.Text
cn.Close()
com.CommandText = "select * from password where ([user]= " & s & " )"
cn.Open()
r = com.ExecuteReader
If r.Read Then
If (r.GetValue(0) = a) And (r.GetValue(2) = b) Then
r.Close()
cn.Close()
com.CommandText = "select * password where ([password]=" & b & " )"
cn.Open()
r = com.ExecuteReader
TextBox2.Text = ""
If r.Read Then
user = r.GetValue(2)
cn.Close()
Panel1.Visible = False
Me.Hide()
Form2.Show()
End If
Else
MsgBox("please enter the righte password", MsgBoxStyle.Exclamation)
TextBox2.Text = ""
End If
End If
r.Close()
cn.Close()

