473,379 Members | 1,491 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

set a time out on a value

27
Hey all is it possible to tell a value in a db to expire after a certain amount of time?

for example when a user logs in it sets a value to 1 and after 10 mintues it needs to be set to 0

any ideas?

im using sql 2000 server and vb asp thanks
Aug 22 '07 #1
1 1161
ck9663
2,878 Expert 2GB
Hey all is it possible to tell a value in a db to expire after a certain amount of time?

for example when a user logs in it sets a value to 1 and after 10 mintues it needs to be set to 0

any ideas?

im using sql 2000 server and vb asp thanks

if your application is a browser-based application, i would assume this is for login tracking...create a unique session id every successful login...keep track of that id in a SESSIONTABLE (of some sort)...on top of every page, run a function that accepts that id, check a LASTACCESSDATE field. if datediff(mm, getdate(), LASTACCESSDATE) >= 10, update the SESSIONTABLE.status = 'T' (for timeout) and let this function return a failed flag...on the ASP page, if the function returned a failed flag, then it's timeout...redirect your page to a "SESSION TIMEOUT" page...

if the datediff(mm, getdate(), LASTACCESSDATE) < 10, update the LASTACCESSDATE with getdate(), meaning the last time your application was used is the current date-time....then let this function return a success flag...on your ASP page, if the function returned a success flag, proceed to your page...

make sense?
Aug 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: lduperval | last post by:
Hi, I`m trying to do date calculations in three types of time zones: local, GMT and specified. The issue I am facing is that I need to be able to specify a date in the proper time zone, and I`m...
2
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx....
15
by: Oleg Leikin | last post by:
Hi, (newbie question) I've created some simple .NET ASP application that should store cookies at the client machine. According to the documentation cookie expiration time is set via...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
19
by: Melvin G. Sheppers | last post by:
I want to display the time in a particular timezone (US Central) regardless where the computer is located. I have written the script below which displays the time in the Eastern, Central, Mountain,...
5
by: Summu82 | last post by:
HI I have to convert a time in the format i have year month day hour min and seconds I need to convert this into time in seconds since 1 jan 1970 i.e the
5
by: chaos | last post by:
Hi , I stuck in my project as i face a problem How to show the available time of the venue when i select the day?? Need to connect to the database to find out the available time of the venue on...
1
by: afaheem | last post by:
I have select boxes for starttime and endtime in hours, minutes and AM/PM. I need to validate the time so that end time should be greater than start time. The AM and PM should also be validated. ...
1
by: nigelesquire | last post by:
I am in need of your assistance. I have a page with multiple unixtime stamps and I need to display them in readable time and date with the user's time zone. Below is the code. <!DOCTYPE...
4
by: Path9898 | last post by:
Hi, I need some help with time. I have a dropdown list that shows various times so the user can select the time most relevant to their needs, but the system pre-selects the current time <% Dim...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.