Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 1st, 2005, 03:28 AM
Authorized User
Join Date: Nov 2005
Posts: 72
Thanks: 3
Thanked 0 Times in 0 Posts
Default Counting amount of record


I have an amount of record and after a while I want to know if there are still some records left which have not been altered. I use the next

sql="SELECT COUNT(*) FROM Table WHERE (Conditions)"
rs.open sql, conn

It doen´t work, it always says I have records left, althought when I go to the table there aren´t any left (with thos conditions).

If there is another way, pelase tell me.

Regards and thx,


Old December 1st, 2005, 06:28 AM
Friend of Wrox
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post

Hi David,

Your code is giving you a count of the fields in your recordset, not the count of the records, try this...
sql="SELECT COUNT(*) AS recordcount FROM Table WHERE (Conditions)"
rs.open sql, conn


Old December 1st, 2005, 08:08 AM
Authorized User
Join Date: Nov 2005
Posts: 72
Thanks: 3
Thanked 0 Times in 0 Posts

Thx Chris!
Just what I have been looking for


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to retrieve the amount nimmalaramesh SQL Server 2000 1 December 26th, 2007 12:38 PM
x amount of records per column Adam H-W Classic ASP Basics 4 April 27th, 2007 12:21 PM
record counting keyvanjan Classic ASP Databases 0 June 30th, 2005 01:20 AM
Counting unique record dlamarche Access 5 March 22nd, 2005 08:51 AM
counting record numbers in a loop sniffer Classic ASP Basics 2 October 21st, 2004 11:49 AM

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