Home | Advertising Info157 USERS CURRENTLY ONLINE   
   Site Search Contact Us Friday, April 20, 2018  

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


We didn't realize
the site was so popular.

Other Stuff

Active Server Pages ASP control controls class classes module script Scripts applet CJWSoft ASPProtect ASPBanner ASPClassifieds

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


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


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:
Session Started Session Ended
2:34 PM 2:50PM
3:35 PM 4:15PM

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


   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2018 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 ASP programs help tutorial tutorials routine routines jobs listserve mailinglist bulletin board bulletin boards programming snippet snippets 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