检查表中的现有EmployeeId,然后在同一个表中更新密码 [英] Check for existing EmployeeId in the table and then update password in same table

查看:78
本文介绍了检查表中的现有EmployeeId,然后在同一个表中更新密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的专家,


我遇到了相当不错的错误,我理解但无法应对。


我是什么我期待的是:我有一个表格为第一次用户提供OTP。用户必须从组合框中选择雇员姓名。这是从表AddUser获取的。现在所有检查验证都很好。但扭曲是;我希望在密码文本框中输入的值应插入表AddUser中。通过比较其中的员工ID。

注意:最初密码字段中的值为空。


详情如下:

表1: - AddUser(Id {Auto no},EmployeeId,Password,SOEID ...等)


表2: - tblUserquery(EmployeeId,Password,SOEID)


有一个表格''GetPassword''


代码:

展开 | 选择 | 换行 | 行号

解决方案

简单的更新查询会执行此操作,或者您可能会非常喜欢...


我看到您的代码出现的一个问题是常量使用 currentdb 每次使用都会创建一个指向数据库的新指针...


现在我使用了很多记录集...举个例子

展开 | 选择 < span class =codeDivider> | Wrap | 行号


我第二个Z'建议您不要以纯文本格式存储密码。这是非常糟糕的安全实践。最近看看有关数据泄露和泄露密码的新闻中的所有故事,你不想以糟糕的安全措施结束。


在第一个代码块中,在第4行,你不应该将密码加载到表单控件中。这让任何人都可以看到其他人的密码。


在第5行的第一段代码中,您不需要对员工进行查询id,你已经在组合框中了。


首先,我要感谢zmbd和兔子,感谢宝贵的时间。我很高兴有人在那里指导我。


现在我将调查zmbd建议我做什么。


另外,我是了解MD5 Algo。但是,如果我不允许用户超出表单视图,他们是否能够查看我的控件值(因为它们是不可见的)?实际上,我不知道如何实现这些算法来保护我的高度敏感数据。谢谢zmbd :)


非常感谢突出第5行的缺陷,我已经纠正了@rabbit。 :)

Dear Experts,

I am stuck with pretty good error, which I understand but unable to cope up with.

What I am expecting is : I have a form to provide OTP to 1st time users. The user have to select the Employee Name from the "Combo Box" which is fetched from the Table "AddUser". Now All the validation for checking is perfectly fine. But the twist is; I want that the value entered in the password textbox should be inserted in the table "AddUser" by comparing the Employee Id in it.
Note: Initially the value in password field is null.


The Details are as below:
Table 1:- AddUser(Id{Auto no},EmployeeId,Password,SOEID...etc)

Table 2:- tblUserquery(EmployeeId,Password,SOEID)

There is a form ''GetPassword''

Code:

Expand|Select|Wrap|Line Numbers

解决方案

Simple update query will do this or you can get very fancy...

One problem I see with your code is the constant use of currentdb each use creates a new pointer to the database...

Now I use record sets a lot... so as an example

Expand|Select|Wrap|Line Numbers


I second Z''s recommendation that you should not store passwords in plain text. It''s extremely bad security practice. Just look at all the stories in the news recently about data breaches and leaked passwords, you don''t want to end up there with poor security practices.

In the first block of code, on line 4, you shouldn''t be loading the password into a form control. That let''s anyone see everyone else''s password.

In the first block of code, on line 5, you don''t need to do a lookup on the employee id, you already have it in the combo box.


First of all I would like to thank zmbd and rabbit for your valuable time. I am glad that somebody is there to guide me.

Now I will look into what zmbd suggested me to.

Also, I am aware about the MD5 Algo. But, If I am not allowing users to go beyond the form view, will they be able to view my control values (as they are invisible)?. Actually, I was not knowing the way to implement those algo''s to secure my highly sensitive data''s. Thanks zmbd :)

Thanks a lot to highlight the flaw in line 5, I have corrected it @rabbit. :)


这篇关于检查表中的现有EmployeeId,然后在同一个表中更新密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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