Budakcomel
Please try and not post the same question on the forum twice.
Are you needing sql logic or the logic in assembling the asp line? Since The sql logic was given to you in your previous post, here's the asp logic.
querystring = "UPDATE tblUsers SET PASSWORD = '" & newpass & "' WHERE USERNAME = '" & username & "' AND PASSWORD = '" & oldpass & "';"
Please respond to this posting only for questions, let me know if you need anymore help.