Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I am using MS-Access 2007 database as back end. I am having a login table with five feilds. I want to use the change password option. I used update query for this process. But it showing syntax error.

"cmd = new OleDbCommand("update login set Password='" + TextBox9.Text + "', Conformpassword='" + TextBox10.Text + "', where Username='" + TextBox11.Text + "' and Password='" + TextBox8.Text + "'", con);

cmd.ExecuteNonQuery();"

But i checked it. Please can you say the solution for solve this error. I am working in final stage of project. Please i am waiting for your help.

Thank you,
Regards,
Sangeetha
Posted

put three text boxes for current(textbox1), new(2) and confirm(3) passwords....

first confirm current password is correct
den check

if 2 and 3 are equal

update tablename set password='textbox2 or 3 value' where username=''
 
Share this answer
 
Hi,

See this link if could help:
Add, Update And Delete From A Textbox (Access)

Regards,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900