Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2006, 11:29 PM
Registered User
 
Join Date: Jun 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default disply logout time

I'm using asp and sql server, i hava also used vb script and java script . i have to time field type call login and logout.i want to findout logout time.i can disply already login time and i can used now() function and insert into the database. but in logout time ,i can used same function now().when i saw in database it disply login time not logout time.i also used query in sql server.


q= "update LoginHistory set LoginHistoryOutTime= #" & now() & "# where LoginHistorySessionID=" & Session.SessionID & ""
Response.Write q
Set rs=con.Execute(q)

but it show error. Error is Incorrect syntax near '10'


How can reslove my problem.
pls suggest me...

thank


 
Old June 26th, 2006, 11:48 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii dayarprasad!!

You can handle your logout event ,on global.asa file or any other like "logout.asp" file.
but ensure that in session.abandon page you can access session variables and you can use your logout sql to execute.
Don't always rely on session_onEnd event handler(in global.asa) file,session default timeout is 20 mints,if user do not perform any activity for 20 mints,it will be fire,even if user has no intention to logout.Also if user closes the browser for say in x mint,the session_onEnd event will fire after approx.(x+20) mint.
for more details http://p2p.wrox.com/topic.asp?TOPIC_ID=1774
hope this will help you

Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
Disply logout time dayarprasad MySQL 0 June 22nd, 2006 11:40 PM
Disply Logout Time in asp dayarprasad MySQL 1 June 22nd, 2006 08:43 AM
logout TIME and logout DATE crmpicco Classic ASP Databases 2 January 20th, 2005 12:01 AM
logout TIME and logout DATE crmpicco Classic ASP Basics 0 January 19th, 2005 07:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.