Here, first you need to establish one connection with database, if you don't have one then refer to this
CLICK HERE for creating a connection with database. Then change the code to something like this.
vb
If txtNewname.Text = Val(txtName.Text) And txtNewpassword.Text = Val(txtNewpassword.Text) & _
txtConfirmpassword.Text = Val(txtConfirmpassword.Text) Then
Else
strQuery = "UPDATE TABLE_NAME SET USER_NAME = " & txtNewname.Text & ", PASSWORD = " & txtNewpassword.Text & " WHERE USER_NAME = " & <PROVIDE CURRENT PASSWORD TEXT BOX STRING HERE>
With m_dbCmd
.CommandType = adCmdText
.CommandText = strQuery
.Execute
End With
End If
All objects I have used is based on the example database connection snippet, you need to replace with your's. And the SQL statement is for SQL Server, if you are not using SQL Server then you need to make the necessary changes.