En executant mon programme vb.net j'ai eu cet erreur seulement avec windows 10 sachant que ça marche avec windows 7
"An unhandled exception of type 'System.Security.Authentication.AuthenticationException' occurred in MySql.Data.dll. Additional information: Échec d'un appel à SSPI, consultez l'exception interne. Pouvez vous m'aider à résoudre cet erreur SVP
Merci
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 Imports MySql.Data.MySqlClient Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim Str As String = "SERVER=localhost; uid =root;DATABASE =mag;PASSWORD =;" Dim cc As New MySqlConnection(Str) Try conn.Open() Dim Sql = "SELECT * FROM tab1 WHERE login='" & TextBox1.Text & "' and password='" & TextBox2.Text & " '" Dim cmd = New MySqlCommand(Sql, cc) Dim dr = cmd.ExecuteReader dr.Read() If dr.HasRows = 0 Then MsgBox("Error.", vbQuestion) Else Me.Hide() Form2.Show() End If Catch ex As MySqlException MessageBox.Show(ex.Message) End Try End Sub End Class
Partager