1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Dim MySqlConnection27 As New MySqlConnection
MySqlConnection27.ConnectionString = "server=mysql-ya42800.alwaysdata.net;Port=3306; userid=****; password=****; database=ya42800_sqllogin;"
Dim reader27 As MySqlDataReader
Dim command27 As New MySqlCommand
Try
MySqlConnection27.Open()
Dim query27 As String
query27 = "UPDATE ya42800_sqllogin.login SET username=@u , " & Form4.MaterialSingleLineTextField1.Text & "AvatarPerso=@a , " & Form4.Label7.Text & " WHERE username=@u" & Form4.MaterialSingleLineTextField1.Text & ""
command27 = New MySqlCommand(query27, MySqlConnection27)
command27.Parameters.Add(New MySqlParameter("@a", MySqlDbType.Text))
command27.Parameters.Add(New MySqlParameter("@u", MySqlDbType.VarChar))
command27.Parameters("@a").Value = (Form4.Label7.Text)
command27.Parameters("@u").Value = (Form4.MaterialSingleLineTextField1.Text)
reader27 = command27.ExecuteReader
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
MySqlConnection26.Close()
End Try |