Vb.gestion des stagiaires

Résolu
sanaSBHA Messages postés 4 Date d'inscription lundi 21 décembre 2009 Statut Membre Dernière intervention 25 avril 2010 - 23 avril 2010 à 12:13
sanaSBHA Messages postés 4 Date d'inscription lundi 21 décembre 2009 Statut Membre Dernière intervention 25 avril 2010 - 24 avril 2010 à 16:57
bonjours la code d'authentification affiche l'erreur suivante je sais pas prk :(((

voila l'erreur: erreur d'execution '-214727900(80040e14)': [MySQL][ODBC3.51 Driver][mysqld-5.0.51] Unknown column 'login' in 'where clause'


vola le code vb :

Public matricule As Integer
Public nom, prenom, service, profil, logins, motpass, req1 As String

Private Sub Command1_Click()
matricule = 0
nom = ""
prenom = ""
profil = ""
logins = ""
motpass = ""
service = ""
req1 = "select * from user where motpass= '" & txtpwd.Text & "' and login='" & txtlog.Text & "'"

With Record
.ActiveConnection = Conn
.Source = req1
.Open



End With

While Not Record.EOF

matricule = Record(0).Value
nom = Record(1).Value
prenom = Record(2).Value
motpass = Record(4).Value
profil = Record(5).Value
logins = Record(3).Value
service = Record(6).Value

Record.MoveNext
Wend
Record.Close
If logins <> "" Then
Me.Hide
Menu_Principale.Show

Else
MsgBox "donnees incorrect"
End If

txtlog.Text = ""
txtpwd.Text = ""

End Sub

Private Sub Command2_Click()
txtlog.Text = ""
txtpwd.Text = ""
a = MsgBox(" Etes vous sûr de quitter?", vbOKCancel, "Confirmation")
If (a = vbOK) Then
End
Else: Authantifier.Show
End If
End Sub

Private Sub Form_Load()
Call ConnexionMysql("gestion_stagiaires", "localhost", "root", "")
End Sub










2 réponses

lolokun Messages postés 1241 Date d'inscription mardi 10 octobre 2006 Statut Membre Dernière intervention 27 août 2013 7
23 avril 2010 à 13:30
Bonjour,

As-tu bien un champ "login" dans ta base, et non "logins"?
Avant d'exécuter ta requête req1, affiche là, et exécute la directement sur ta base sans passer par ton programme pour voir si y'a pas un souci dans la syntaxe..

L'expérience, c'est une connerie par jour, mais jamais la même..
3
sanaSBHA Messages postés 4 Date d'inscription lundi 21 décembre 2009 Statut Membre Dernière intervention 25 avril 2010
24 avril 2010 à 16:57
merciiiiiiiiiii :))))
3
Rejoignez-nous