session time

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.
MumtazAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

freshmeatCommented:
try:
session("timeout")=60
0
rhinosaurCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MumtazAuthor Commented:
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
rhinosaurCommented:
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
MumtazAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.