Print Page | Close Window

SImple standard recordset that counts

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4838
Printed Date: 30 March 2026 at 1:12pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: SImple standard recordset that counts
Posted By: PaulGQ
Subject: SImple standard recordset that counts
Date Posted: 07 August 2003 at 12:21pm

I am retreiving a standard recordset with the following code:

<%
Set obj = nothing
set conn = server.CreateObject("ADODB.Connection")
set rs = server.CreateObject("ADODB.Recordset")
Conn.Open "DBQ=" & Server.Mappath("Lounge.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
SQL = "SELECT * FROM qrySessions WHERE ((LoginDate) Like '%" & Request.QueryString("LoginDate") & "%') AND ((LoginTime) Like '%" & Request.QueryString("LoginTime") & "%')"
set rs = conn.Execute (SQL)
%>

How do I add a field that keeps track of how many times the value in the [target] field is in the database?

Something like ?

SELECT RecordCount=count(*), * FROM tblWWWLog ..........

then <%=(rs.Fields("RecordCount").Value)%> in the body of the page?

Basicially I need to know if this is a new visitor hitting the web site, or a return visitor

I can't get it to work and need help. 

 

 




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