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 October 20th, 2006, 02:12 AM
Authorized User
 
Join Date: Oct 2006
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP Total Records Fetched

Hi,

How do I know how many records are in my recordset?



Like: I have this query running in ASP


set rs2 = server.CreateObject("adodb.recordset")
RS2.open "SELECT id FROM tblcontest", conndb
response.Write rs2.recordcount

I get the result as -1 but I want to know how many total number of records are there in my recordset.

I hope u understand wot I mean.


Thanx






-----------------------------------------------
www.chargertek.in - Cheapest WebHosting
__________________
-----------------------------------------------
www.chargertek.in - Cheapest WebHosting
 
Old October 20th, 2006, 10:22 AM
Authorized User
 
Join Date: Oct 2006
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ricespn
Default

If RECORDCOUNT gives you a result 1 that's the total number of records in your RECORDSET.

=======================
Strange and crazy, but everything is possible
 
Old October 20th, 2006, 10:27 AM
Authorized User
 
Join Date: Oct 2006
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No its showing me -1 and not 1

-----------------------------------------------
www.chargertek.in - Cheapest WebHosting
 
Old October 20th, 2006, 12:21 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Try this.

RS2.open "SELECT id FROM tblcontest", conndb, 3, 3
Response.Write rs2.recordcount







Similar Threads
Thread Thread Starter Forum Replies Last Post
Total Count of Specific Records in a Report Odeh Naber Access 5 August 1st, 2007 03:50 AM
Get total records europhreak Classic ASP Basics 10 February 5th, 2006 02:12 PM
how to find total no. of records reshmisworld Classic ASP Basics 1 July 24th, 2003 08:04 PM
finding total no. of records reshmisworld Classic ASP Databases 4 July 24th, 2003 06:35 PM
finding total no. of records reshmisworld Classic ASP Databases 1 July 24th, 2003 03:23 PM





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