Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rs.recordcount always -1! 1

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
Even though I can access the information in the recordset, rs.RecordCount always returns a -1. What is going on?

sql = "Select * from
"
set rs = server.CreateObject("adodb.recordset")
rs.Open sql, conn 'conn is specified in an include file
Response.Write rs.RecordCount
Response.Write rs("field1") 'actually has a value!
rs.close
 
thread333-65164

We had a discussion about that a few days ago.

RobV posted a good explanation of why that happens, and how to fix it.

I'll refer you to his explanation

good luck! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top