Print Page | Close Window

rs.RecordCount Problem

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=512
Printed Date: 29 March 2026 at 2:30am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: rs.RecordCount Problem
Posted By: michael
Subject: rs.RecordCount Problem
Date Posted: 25 February 2003 at 11:21am

Ok, I have a page which I ran on my server at home fine, everything worked. Thus when I uploaded it to my host it did not work quite as well.
I have a Recordset which I open in the following way:
rs.Open strSQL, conn, 1, 2
Then I want to put the total number of records (for paging) into a variable with
totalRecs = rs.RecordCount

Then problem now is that on my server at home it takes the correct value and let's me page but on my live server it always takes the value -1. Does anyone know why that would be or what I would have my host to have updated??

Thanks



-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Replies:
Posted By: MorningZ
Date Posted: 25 February 2003 at 11:25am
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.CursorLocation = 3
rs.Open strSQL, conn


should work for ya

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: michael
Date Posted: 25 February 2003 at 11:37am
You're the man. Many thanks. Works.



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