Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Global ASA - Session_OnEnd


Message #1 by "John P. Miller" <jpmiller@a...> on Wed, 26 Sep 2001 09:05:28 -0400
I am trying to use the script below to toggle a check box in my database 

to show that a user has logged out. It doesn't work. What am I doing 

wrong? I have a similar script that does toggle the check box to on, 

it's value is set to -1. If I call the script from within an ASP page, 

it works. Also, is there a way to force the code to run immediately 

after the browser has been closed?



Code:

SUB Session_OnEnd



session.timeout=1



Set OBJdbConnection = Server.CreateObject("ADODB.Connection")



OBJdbConnection.Open "Resa-1"



SQLQueryActive = "Update tblUsers set utActive = 0 where utUserID == '"



SQLQueryActive = SQLQueryActive & Session("UserID")



SQLQueryActive = SQLQueryActive & "'"



Set rsActiveUser = OBJdbConnection.Execute(SQLQueryActive)



END SUB



Thanks in Advance,

John Miller
Message #2 by "Daniel O'Dorisio" <dodorisio@h...> on Wed, 26 Sep 2001 11:26:59 -0400
Maybe the double "=" I've never seen that in a where clause. Only in

javascript/ c++/ awk ect.







-----Original Message-----

From: John P. Miller [mailto:jpmiller@a...] 

Sent: Wednesday, September 26, 2001 9:05 AM

To: ASP Web HowTo

Subject: [asp_web_howto] Global ASA - Session_OnEnd





I am trying to use the script below to toggle a check box in my database



to show that a user has logged out. It doesn't work. What am I doing 

wrong? I have a similar script that does toggle the check box to on, 

it's value is set to -1. If I call the script from within an ASP page, 

it works. Also, is there a way to force the code to run immediately 

after the browser has been closed?



Code:

SUB Session_OnEnd



session.timeout=1



Set OBJdbConnection = Server.CreateObject("ADODB.Connection")



OBJdbConnection.Open "Resa-1"



SQLQueryActive = "Update tblUsers set utActive = 0 where utUserID == '"



SQLQueryActive = SQLQueryActive & Session("UserID")



SQLQueryActive = SQLQueryActive & "'"



Set rsActiveUser = OBJdbConnection.Execute(SQLQueryActive)



END SUB



Thanks in Advance,

John Miller
Message #3 by "John P. Miller" <jpmiller@a...> on Wed, 26 Sep 2001 13:45:49 -0400
That wasn't there when I submitted the question. Must have been put in by an

email server somewhere along the line. Wish it was so simple!



John Miller



----- Original Message -----

From: "Daniel O'Dorisio" <dodorisio@h...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Wednesday, September 26, 2001 11:26 AM

Subject: [asp_web_howto] RE: Global ASA - Session_OnEnd





> Maybe the double "=" I've never seen that in a where clause. Only in

> javascript/ c++/ awk ect.

>

>

>

> -----Original Message-----

> From: John P. Miller [mailto:jpmiller@a...]

> Sent: Wednesday, September 26, 2001 9:05 AM

> To: ASP Web HowTo

> Subject: [asp_web_howto] Global ASA - Session_OnEnd

>

>

> I am trying to use the script below to toggle a check box in my database

>

> to show that a user has logged out. It doesn't work. What am I doing

> wrong? I have a similar script that does toggle the check box to on,

> it's value is set to -1. If I call the script from within an ASP page,

> it works. Also, is there a way to force the code to run immediately

> after the browser has been closed?

>

> Code:

> SUB Session_OnEnd

>

> session.timeout=1

>

> Set OBJdbConnection = Server.CreateObject("ADODB.Connection")

>

> OBJdbConnection.Open "Resa-1"

>

> SQLQueryActive = "Update tblUsers set utActive = 0 where utUserID == '"

>

> SQLQueryActive = SQLQueryActive & Session("UserID")

>

> SQLQueryActive = SQLQueryActive & "'"

>

> Set rsActiveUser = OBJdbConnection.Execute(SQLQueryActive)

>

> END SUB

>

> Thanks in Advance,

> John Miller




  Return to Index