Imports System.Web
Imports System.Web.SessionState
Imports System.Data
Imports System.Date.OleDb
Public Class Global
Inherits System.Web.HttpApplication
#Region " Component Designer Generated Code "
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Required by the Component Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Component Designer
'It can be modified using the Component Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
End Sub
#End Region
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Dim cnAccess as New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\streech.mdb")
cnAccess.Open()
Dim sql,sessionEnd as String
sessionEnd = DateTime.Now
sql = "Insert into client_log (session_end) values (" & chr(34) & sessionEnd & chr(34) & ") where (session_id = kyqkdoiicjcldd33f0cwtgyv)"
Dim cmdInsert as New OleDbCommand(sql,cnAccess)
cmdInsert.ExecuteNonQuery()
End Sub
End Class