Insert a row in the Audit Trail table when they log on. Store the ID of that in the user's Session. Update the row, using the ID stored in the Session, when they LogOff.
If they do NOT logoff its a bit more tricky - their session will, presumably, expire of its own accord XXX minutes after last activity.
You could record a "most recent activity" column too, so each time they do something you upload the Date/Time in that column; then if they don't logoff the LogOutTime will be NULL, but you will have the "most recent activity" time instead.
answered Nov 09 '09 at 08:33 AM
I need to do the same but cannot find a solution to this paradigm. Someone please help!
answered Oct 18 '11 at 03:51 AM