Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear ALL
now i have a DB on Mysql server and i have an interface using C# for lan users ,now when each user log in using the software , the software insert the log in userID (they are users related to the software not the Mysql servers users) in a certain table and insert also login time/date and when the user exist from the software , it inserts the logout time/date
i use this table to prevent login using the same USER from two PC at the same time , so if a user is not logout ,it can't login again from another pc

the problem that if a problem happened with the software or the PC or electricity cutoff , the software doesn't insert logout time/date so when the user try relogin , he can't access since the software thinks that the user is already logged on

so how to solve such problem??

thanks
bye
Posted

1 solution

You need to have a mechanism that allows for this: something like if the power cuts off a user needs to have the ability to reset their own log in. How you set the rules for this is down to your requirements but there has to be a little trust or you need to have a central administrator or help desk person that has access to an admin part of the application that allows them to reset for a user.

By they way, this isn't really a database issue, it's a coding issue so should have been tagged with c# or whatever language you are using rather than MySql (which is not really relevant to the problem)
 
Share this answer
 
v2
Comments
Wild-Programmer 31-May-11 3:57am    
Good answer :) my 5.
Kim Togo 31-May-11 4:42am    
Good answer. And in addition to this. You can have your program update the table in a predefined time, just to indicate that the program is still running.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900