Hello, I need to access the database when a session unexpectedly ends or session times out. This is just for telling the database to update a field for when the user last logged in. The reason I need this is that it saves me tons of coding for other stuff so I do not have to use excess database ruitines, excess functions, etc.
Please if you know how to force the server to do an update on session timeouts or unexpected ends, please help.
asp.net 2.0 vb.net or lower MySQL
goto the 'CODEBEHIND' in your global.asax file located at the root. then there are events in their to handle all these occurances.
i.e. session start / end, application start / end even an event for request if the need for validation is so great.
something like
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Dim cnn as new ADODB.Connection
cnn.connectionstring = "YOUR CONNECTION STRING"
cnn.open
cnn.execute("your SQL query")
cnn.close()
cnn = nothing
End Sub
but why not change this value on login seeing as it is LAST '''LOGIN''' DATE