in my application i am doing Login.jsp.
When user is login into application, i am updting login value in datebase column as 1 'one'
when user logout it is 0 'zero'
login --> 1
when suddenly client system shutdown due to power loss.
in this case how can i make changes login value from 1 to 0 in data base.
can any one please suggest me.
Thanks in advance
would be almost as reducing the minimum time session
Duc Vo wrote:
Bear Bibeault wrote:Of course, if there is a catastrophic shutdown, there's no event that will be triggered.
In such case, the server starting events can be used to reset the flag to 0 for all users flagged as 1.
I was hoping that the OP was goig to come up with that idea on his own. Sigh.
Victor Hugo M Machado wrote:if you implement something on the client that it is all the time communicating with the server .. you know when the client stops communicating on the same second, so will your "event " to capture and treat ... only that their application can be a drug .. very heavy .. maybe the client 'll be very fat
No. The script for this would actually be rather small.
The problem is that if the client detects this situation, how can it affect the database? It can't.
The solution, as already pointed out, is to make sure that the database is normalized to a consistent state upon startup, just in case it went down "dirty".