Print Page | Close Window

My recordset count return -1

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


Topic: My recordset count return -1
Posted By: ngaisteve1
Subject: My recordset count return -1
Date Posted: 19 May 2003 at 8:20pm
I wonder why my recordset count can return -1. Anyone know the possibilities? Thanks.



Replies:
Posted By: Flamewave
Date Posted: 19 May 2003 at 10:09pm

Taken from http://www.w3schools.com/ado/prop_rs_recordcount.asp - http://www.w3schools.com/ado/prop_rs_recordcount.asp , hope it answers your question.

The RecordCount property returns a long value that indicates the number of records in a Recordset object.

If the Recordset object supports AbsolutePosition and AbsolutePage properties or bookmarks (if Supports(adApproxPosition) or Supports(adBookmark) returns true), this property will return the exact number of records in the Recordset.

Note: This property will return -1 for a forward-only cursor; the actual count for a static or keyset cursor; and -1 or the actual count for a dynamic cursor.

Note: The Recordset object must be open when calling this property. If this property is not supported it will return -1.



-------------
- Flamewave

They say the grass is greener on the other side, but if you really think about it, the grass is greener on both sides.



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