且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MS Access中登录页面上的用户名和密码验证

更新时间:2023-12-03 19:24:52

展开 | 选择 | Wrap | 行号


除了一些额外的注意事项代码本身。


不建议以纯文本格式存储密码。如果任何人都可以访问表,他们可以查看其他问题的所有密码。知道用户经常重复使用密码,您可能无意中不仅会损害您自己的应用程序的安全性,也会损害其他应用程序的安全性。


将值存储为全局变量是一个不错的选择足够的方法。您只需要知道数据库中任何地方的任何未处理错误都会导致这些变量被重置为空。
A few extra things to note besides the code itself.

Storing passwords in plain text is not recommended. If anyone can get access to the tables they can view all the passwords of other issues. Knowing that users often reuse passwords, you might unintentionally not only compromise the safety of your own application but also of other applications.


Storing the values as global variables is a nice enough approach. You just need to be aware that ANY unhandled error anywhere in your database will result in those variables being reset to nothing.


您好TheSmileyCoder,感谢您的回复。实施该计划后,我仍然遇到问题。我试图提供正确的用户名和错误的密码,登录页面继续。应显示一条消息密码无效并且登录页面不应该继续。请再帮帮我这是修改后的代码:
Hi TheSmileyCoder, thanks for the reply. I still have an issue after implementing the program. I tried to supply a correct username and wrong password and the login page proceed. A message should appear "Invalid password" and login page should not proceed. Please help me again. Here''s the revised code:
展开 | 选择 | Wrap | 行号