Print Page | Close Window

Delete Problems

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=8529
Printed Date: 30 March 2026 at 7:27am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Delete Problems
Posted By: twooly
Subject: Delete Problems
Date Posted: 03 January 2004 at 5:58pm

I am trying to create a script that will show users online without using global.asa.  I almost have it working besides one thing.  I want my sql to delete entries in a table once an entry reaches a certain point.  So here is what I have.  My problem is it deletes everything in the table.
Suggesstions.

Here is the code:

strTimeout = 5
StrOnlineTimedout = dateadd("n",-strtimeout*60,onlinedate)

StrSql = "DELETE FROM active_users WHERE Last_Seen < '" & StrOnlineTimedout & "'"
adoCon.execute (StrSql)

I am using an access db and the column Last_Seen has a type "memo" and the form that the date entered into the column is 1/3/2004 2:40:17 PM using the now() function.

Thanks




Replies:
Posted By: ljamal
Date Posted: 03 January 2004 at 7:35pm
see the answer to your question posted in the ASP Discussion forum and please only post in one place next time.

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net