MS Access中登录页面上的用户名和密码验证 [英] Username and password validation on Login Page in MS Access

查看:119
本文介绍了MS Access中登录页面上的用户名和密码验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里的任何人都可以帮我解决问题。我想从用户表中验证我的用户名和密码。如果在用户表中未找到用户名,则应显示消息用户名无效,如果密码无效,则应显示消息密码无效。如果用户名正确且密码无效,则消息应为密码无效,如果密码正确且用户名错误,则应显示消息密码无效。这是我的代码..我提前使用MS Access(VBA)ProgrammingThanks


Hi, anyone here could help me on my codes. I want to validate my username and password from my user table. If username is not found in user table a message should appear "Username Invalid", and If password is invalid a message should appear "Password is invalid." and if Username is correct and password is Invalid a messages should be "Password is invalid", if password is correct and username is wrong a message should appear "Password is invalid". Here''s my code..I am using MS Access (VBA)ProgrammingThanks in advance


展开 | 选择 | 换行 | 行号

推荐答案

展开 | 选择 | 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 | 行号


这篇关于MS Access中登录页面上的用户名和密码验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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