如何更新登录表中的密码 [英] how to update the password in login table

查看:73
本文介绍了如何更新登录表中的密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在使用MS-Access 2007数据库作为后端.我有一个有五个字段的登录表.我想使用更改密码选项.我在此过程中使用了更新查询.但是显示语法错误.

"cmd = new OleDbCommand("更新登录集密码=" + TextBox9.Text +'',Conformpassword =""+ TextBox10.Text +"'',其中用户名=" + TextBox11.Text +"''和Password =''" + TextBox8.Text +'',con);

cmd.ExecuteNonQuery();"

但是我检查了一下.请您说一下解决此错误的解决方案.我正在项目的最后阶段.请等待您的帮助.

谢谢
问候,
Sangeetha

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

推荐答案

为当前(textbox1),new(2)和Confirm(3)密码输入三个文本框....

首先确认当前密码正确
巢穴检查

如果2和3相等

更新表名设置密码="textbox2或3值'',其中用户名=``''
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=''''




如果有帮助,请参见此链接:
从文本框添加,更新和删除(访问)

问候
Hi,

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

Regards,


这篇关于如何更新登录表中的密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆