kaoutar90
Messages postés40Date d'inscriptionvendredi 14 novembre 2008StatutMembreDernière intervention 8 octobre 2011
-
8 sept. 2010 à 12:04
GarnierFlorian
Messages postés129Date d'inscriptionmardi 27 mai 2008StatutMembreDernière intervention26 juillet 2011
-
9 sept. 2010 à 09:24
Bonjour !!
j'ai un projet un rendre dans 3 jours et j'ai un problème que j'ai pas encore réussi à le réussir si vous m'aidez SVP !!
Dim req3 As SqlCommand = New SqlCommand()
Dim rd1 As SqlDataReader
con.Open()
com.CommandText = "select * from Utilisateur where Login='" & TextBox1.Text & "'"
com.Connection = con
rd = com.ExecuteReader()
rd.Read()
If (rd.GetValue(2) = TextBox2.Text) Then
req3.CommandText "select uid from Profilutilisateur where uid rd.GetValue(0)"
req3.Connection = con
rd1 = req3.ExecuteReader()
rd1.Read()
If (rd1.GetValue(1) = "1") Then
Form1.ShowDialog()
ElseIf (rd1.GetValue(1) = "0") Then
Form1.Button1.Enabled = False
Form1.Button2.Enabled = False
Form1.Button3.Enabled = False
Form1.Button6.Enabled = False
Form1.Button7.Enabled = True
Form1.ShowDialog()
End If
Else
MsgBox("Password Incorrect", MsgBoxStyle.Critical)
TextBox1.Text = ""
TextBox2.Text = ""
End If
End If
rd1.Close()
rd.Close()
con.Close()
et il m'afiiche cette erreur qu'une datareadre est dèjà utilisé . Que faire?
AIdez moi SVP !!
Merci !
A voir également:
Un datareader associé à cette command est déjà ouvert. il doit d'abord être fermé.