Home | Advertising Info128 USERS CURRENTLY ONLINE   
   Site Search Contact Us Friday, March 14, 2025  
 
 


 
ASPProtect
User Management Application with web based screens that allow you to manage users.
www.ASPProtect.com
 
ASPBanner
Banner Rotation system. Advertisers can monitor online statistical reports via their web browsers.
www.ASPBanner.com
 
ASP Photo Gallery
Upload an unlimited amount of albums. Set up categories.Image resizing thumbnail creation.
www.ASPPhotoGallery.com
 
ASPClassifieds
Classifieds system. Set up categories. Users can register themselves. Supports picture uploads.
www.ASPClassifieds.com



DISCUSSION ARCHIVES
 



We didn't realize
the site was so popular.

Other Stuff
 

 
 
Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds



(Advanced)  (Components)  (Database)  (General)  (Vbscript)




ASPProtect

 
Subject: recordset problem
From: caz
Date: 9/10/2001 3:23:47 PM
IP: 192.223.186.84



 

--------------------------------------------------------------------------------
Hi,
my problem is kind of hard to explain but I hope everyone is able to understand. If anyone doesn't, please feel free to email me and ask questions because I am really stuck with this one and basically could do with all the help I can get!

Basically, I am working on a tool that tracks our users' usage of an application and what I am trying to do at the moment is using VBScript list the last ten sessions for a particular user.

What I eventually want to end up is the following format:
eg
Session Started Session Ended
2:34 PM 2:50PM
3:35 PM 4:15PM
etc...

Every single request that a user makes is tracked in a database so I am using a recordset object to retrieve the results
My SQL statement is as follows:
sql = "SELECT * FROM event_log" & _
"WHERE (event_id = 1 OR event_id = 2 OR event_id = 10 OR event_id = 0)" & _
"AND user_id="ABC" & _
"ORDER BY event_time DESC"

The event_id's mean the following:
1 = login success
2 = login failure
10 = logout
0 = regular page request once the user is logged in

A session start with a login failure or if there is none, a login success
A session ends with either a logout or when the last request was more than 20 minutes ago

The easiest way to explain is to give an example of a recordset and show the expected results

[b]Event# event_time event_id
1 2:34 0
2 3:05 2
3 3:07 2
4 3:08 1
5 3:09 0
6 3:11 10
7 3:15 1
8


 

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright © 1998 - 2025 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com