salut,
j'ai crée un formulaire pour faire l'authentification pour accéder au menu Mais le problème c'est lorsque j'entre le login et le mot de passe du premier ligne de la table utilisateur sous sql server il rentre mais si j'entre le login et le mot de passe du 2 éme ligne de la table ça marche pas ..
voila le code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Imports System.Data
Imports System.Data.SqlClient
Public Class authentifier
 
    Private Sub valider_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles valider.Click
 
        Dim n As Integer = 0
        If T1.Text = Nothing Or T2.Text = Nothing Then
            MsgBox("Erreur : saisir les informations de sécurité ", MsgBoxStyle.Exclamation, "Infomation")
            Exit Sub
        End If
        remplissage("utilisateur")
        For i = 0 To odt.Rows.Count - 1
            If odt.Rows(i).Item(0) = (T1.Text).Trim And odt.Rows(i).Item(1) = (T2.Text).Trim Then
                MsgBox("Bienvenu Mr/Mm " & odt.Rows(i).Item(6), MsgBoxStyle.Information, "Message")
                Dim a As New menu
                a.Show()
                Me.Hide()
                Exit Sub
            Else
                MsgBox("Erreur : information incorrect ", MsgBoxStyle.Critical, "Erreur")
                T1.Text = Nothing
                T2.Text = Nothing
            End If
        Next
            n += 1
            If n = 3 Then
                MsgBox("Vous avez dépasser le nombre d'essaye ; Ressayer plus tard ", MsgBoxStyle.Critical, "Erreur")
                T1.Enabled = False
                T2.Enabled = False
 
            End If
 
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.Close()
    End Sub
 
    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
        Dim a As New Securité
        a.Show()
        Me.Visible = False
    End Sub
 
    Private Sub authentifier_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 
    End Sub
End Class
Merci de m'aider