You just missed the condition only as per krunal Rohit the query needs a condition for update data otherwise it will affect all rows of table.
For this You design should required
Old User Name:_______________
Old Password:________________
New username:________________
New Password:________________
It needs more condition only like
".......
WHERE username='"+txtOldUserName.Text+"' and password='"+txtOldPassword.Text+"'";
See the concept for what to do