[英]How to maintain unique login in windows form application?
I am developing a winform application in which user's login is validated through ms sql server 2000 database.When user entry its user name and password, application checks its exists in user table or not. 我正在开发一个winform应用程序,其中通过ms sql server 2000数据库验证用户的登录名。当用户输入其用户名和密码时,应用程序检查其是否存在于用户表中。
Now my requirement is if a user already login through one system it should not log in through another system. 现在,我的要求是,如果用户已经通过一个系统登录,则不应通过另一个系统登录。
if solution like make entry in database about status of user like on successful log in mark user status is true and on closing application mark false , then in the case of network or hardware failure or system exception. 如果诸如在数据库中成功登录用户状态为true并在关闭应用程序标记为false时之类的关于使用户状态进入数据库的解决方案,则在网络或硬件出现故障或系统异常的情况下。
so, please suggest me a optimal solution . 所以,请给我建议一个最佳解决方案。
You should use timeout. 您应该使用超时。 the successful log in is stored in status table with datetime and detect whether user is idle for timeout duration then mark false. 成功登录将与日期时间一起存储在状态表中,并检测用户是否闲置超时时间,然后将其标记为false。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.