Advertisement
Guest User

Untitled

a guest
Nov 9th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. Private Sub SaveChanges_Click(sender As System.Object, e As System.EventArgs) Handles SaveChanges.Click
  2.  
  3. Dim con As New MySqlConnection("host = localhost; username = root; password = 1234; database = logindb")
  4. Dim cmd As New MySqlCommand
  5.  
  6. con.Open()
  7. cmd.Connection = con
  8. cmd.CommandText = "UPDATE login SET username = '" & ChangeUsername.Text & "' and password = '" & ChangePassword.Text & "' and Security_Question1 ='" & ChangeSecQue1.Text & "' and Security_Question2 = '" & ChangeSecQue2.Text & "' and Security_Answer1 = '" & ChangeSecAns1.Text & "' and Security_Answer2 = '" & ChangeSecAns2.Text & "' "
  9. cmd.ExecuteNonQuery()
  10. MsgBox("Saved Changes!")
  11. con.Close()
  12.  
  13. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement