I want to insert into the table from a windows form when I run and I try to use this functionality an exception occurs which is
field 'the string i wrote ' unknown in field list" "pointing towards "resultat = cmd.ExecuteNonQuery"
Sub maj()
Dim cnx As New MySqlConnection("datasource=localhost;database=bdgeststock;username=root;password=")
Dim cmd As MySqlCommand = cnx.CreateCommand
Dim resultat As Integer
If ConnectionState.Open Then
cnx.Close()
End If
cnx.Open()
cmd.CommandText = "insert into utilisateur(login,password,type)value(" & TextBox3.Text & "," & TextBox4.Text & "," & ListBox1.SelectedItem() & ")"
resultat = cmd.ExecuteNonQuery
If (resultat = 0) Then
MessageBox.Show("error")
Else
MessageBox.Show("success")
End If
cnx.Close()
cmd.Dispose()
End Sub