Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'user wants to change password
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Dim connection As New OleDbConnection
- connection = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|db1.accdb;Persist Security Info=True")
- Try
- connection.Open()
- Dim command As OleDbCommand = connection.CreateCommand
- command.CommandType = CommandType.Text
- command.CommandText = "Update UserAccount SET Password ='" + TextBox2.Text + "' WHERE Username = User"
- command.ExecuteNonQuery()
- MsgBox("Updated")z
- TextBox2.Text = ""
- TextBox3.Text = ""
- Catch ex As Exception
- MsgBox(ex.Message)
- End Try
Add Comment
Please, Sign In to add comment