Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 2nd, 2005, 03:40 PM
Authorized User
Join Date: Jun 2005
Location: HSP, , .
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem displaying User Status from SQL

Hello all,

I am using the following stored procedure to recoed the online and offline status of user

CREATE PROCEDURE sproc_onlinemembers
@UID varchar(15)

DECLARE @Username char(16)
SELECT @Username=Username FROM UserLogin WHERE UserID=@UID

SET Status='1', statustime=getdate(), lastlogin=getdate()
WHERE Username=@Username

SET Status='0'
WHERE datediff(n,statustime,getdate()) > 30 OR StatusTime=NULL

Now I am trying to use it in my asp page so that I can show that whether the user is offline or online but it is even showing users online who have logged out before 30 minutes. Here is how I am displaying it in one page

************************************************** ******

IF ORs("Status")=TRUE THEN
Response.Write "<img src='/new/images/online.gif' width='25' height='122'>"
Response.Write "<img src='/new/images/offline.gif' width='25' height='122'>"

Now this was working fine and then I had to switch to another hard drive and I mirrored everything onto this hard drive. Since then I am having this problem. Please suggest

Thank you,
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating user status with checkbox arnabghosh Pro PHP 1 February 12th, 2006 06:02 PM
Displaying user image from sql database palvin Classic ASP Databases 14 July 6th, 2005 05:09 AM
Displaying Status in steps sankar Classic ASP Basics 1 April 27th, 2004 03:36 AM
Displaying Url from database in Status Bar ntriqetev Classic ASP Basics 1 December 17th, 2003 09:40 AM

All times are GMT -4. The time now is 10:39 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.