C
Christian Blackburn
Hi Gang,
Let me start by saying I'm using Visual Web Developer 2005 and ASP.net
2.0. Is there something I have to do to get my Global.asax fire when
my application loads. If I set a breakpoint nothing happens also I can
tell that it's not updating my database. I'm storing the users's
session ID in the database to prevent multiple logins. However, when
their session expires it's not clearning their record. Are there
prohibitive constraints on the functionality accessible from
Global.asax?
Thanks a bundle,
Christian Blackburn
-------------------------------------------------------------------------------------------------------------------------------------
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
'Creates the database's Connection object
Dim oConn As New System.Data.Odbc.OdbcConnection("DSN=" &
strDSN)
'Creates a Command object
Dim oCommand As New System.Data.Odbc.OdbcCommand
'Opens the connection
oConn.Open()
'Specifies the command to execute,
'we're clearing all the recorded session IDs
oCommand.CommandText = "UPDATE users " & vbCrLf & _
"SET session_id = '';"
MsgBox(oCommand.CommandText)
'Tells the command object to use the connection above
oCommand.Connection = oConn
'Executes the command
oCommand.ExecuteNonQuery()
'Closes the database connection
oConn.Close()
End Sub
-------------------------------------------------------------------------------------------------------------------------------------
Let me start by saying I'm using Visual Web Developer 2005 and ASP.net
2.0. Is there something I have to do to get my Global.asax fire when
my application loads. If I set a breakpoint nothing happens also I can
tell that it's not updating my database. I'm storing the users's
session ID in the database to prevent multiple logins. However, when
their session expires it's not clearning their record. Are there
prohibitive constraints on the functionality accessible from
Global.asax?
Thanks a bundle,
Christian Blackburn
-------------------------------------------------------------------------------------------------------------------------------------
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
'Creates the database's Connection object
Dim oConn As New System.Data.Odbc.OdbcConnection("DSN=" &
strDSN)
'Creates a Command object
Dim oCommand As New System.Data.Odbc.OdbcCommand
'Opens the connection
oConn.Open()
'Specifies the command to execute,
'we're clearing all the recorded session IDs
oCommand.CommandText = "UPDATE users " & vbCrLf & _
"SET session_id = '';"
MsgBox(oCommand.CommandText)
'Tells the command object to use the connection above
oCommand.Connection = oConn
'Executes the command
oCommand.ExecuteNonQuery()
'Closes the database connection
oConn.Close()
End Sub
-------------------------------------------------------------------------------------------------------------------------------------