Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Self Triggering Code ????

Status
Not open for further replies.

oops4me

Programmer
Jul 7, 2003
50
IN
Hello,

I have a problem with updating db, i want to update some fields in the db on say some event.

for eg;

if the entry posted is one month old then the entry should be archived automatically.

where should i include the code to fetch above result.

if i put it in "session onstart" then it will fire every time a session starts. which will very costly affair.

i know the code but having difficulty in putting it in right place.

i mean when it should be triggered.

please help me.

Mohit Prabhu
 
Do you have an adminstrator only area on your site where you log in to make changes (Content Maintenance System)?

That is where I normally perform any remote Database Housekeeping.

Tony
_______________________________________________________________
 
Hello Sir,

Thanks for your reply.

Yes i have a administrator only area for my site but when exactly should the code be executed is the problem.

onsessionstart will cause a greater overhead.
is there anyway that i could write a procedure in the DB itself i am using "Access DB"

Please write in asap.

anticipating your reply.

Mohit prabhu

 
Perhaps you could test these date conditions on the same ASP page where you do your INSERT ?
 
Personally I wouldn't include it in the website at all, or if I did it would be a seperate page that could be called from a remote script (and only that remote script). Doing this possible archival as a step when someone is waiting for a page to load seems a little hinky.

Best bet would likely be to create a small VBS script to run from the server and just schedule it to run every morning around 1am or something. I don't see the need for this to be tied into the web app at all if it is going to be automatic, tying it in is more of a hack and will cause someone womewhere to take an unnecessary performance hit.

T

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top