[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

session time

Posted on 1999-12-01
5
Medium Priority
?
128 Views
Last Modified: 2010-04-09
I have set

session.timeout=60
in Global.asa file,but when i want to display it in any page by this

dim tim
tim=session.timeout

it gives 20 which is default,why it is so.


second: When i adjust the
session.timeout=60 in global.asa file,when session expires i want to update my database. How i can do it,
i want to update my database through global.asa file.

3. About time i want to get time in min and hours how i can do it. When i use now(),it gives also date,and when i use format function there is error on format.
0
Comment
Question by:Mumtaz
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:freshmeat
ID: 2248719
try:
session("timeout")=60
0
 
LVL 1

Accepted Solution

by:
rhinosaur earned 60 total points
ID: 2249479
I used frames with a continuely refreshing window in the corner. When it picked up they were no longer logged in it ran a script ... which you could change so that it accessed a database. I did it this way as you are rather limited in what you can do from the global.asa file and for some reason I had problems with making it run as expect for some reason ... maybe you are having a similar problem with the timeout thing.

You're correct in writing,

session.timeout = 20

for example in global.asa - are you sure you have global.asa in the correct location and it is being read correctly?

You could try the on session end thing as below but as I said it wouldn't work for me:

sub session_onend
      'do stuff
end sub

The time stuff ... to convert a long time such as tim = 09:33:56 PM to tim = 09:33 I used formatdatetime(tim, 4).

Hope that helps.
0
 

Author Comment

by:Mumtaz
ID: 2250177
I have used the
session.timeout=60
in global.asa on_session_start function.

second how you get
time which format u have suggested.

i mean by which function
tim = 09:33:56 PM

is any possiblity to update database after session timeout from global.asa file.
0
 
LVL 1

Expert Comment

by:rhinosaur
ID: 2250250
Mmmm ... I don't see why not. As long as you don't try and write anything to the browser it should be okay.

In the database if you enter a time into a date/time field then it needs to be 09:58:00 PM for example (use timevalue("09:58"). When you get this time out of the database again you'll want to convert it back to 09:58 using the format thing.
0
 

Author Comment

by:Mumtaz
ID: 2252898
Thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question