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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counting records in a recordset -- problem 1

Status
Not open for further replies.

Stoemp

Programmer
Sep 25, 2002
389
BE
I want to count the number of records in a recordset, but it always gives '-1' as a result.

Here's my code:

SET RS_products = Server.CreateObject("ADODB.RecordSet")
sSQL = "SELECT Id, naam, korte_beschr_" & sLang & " FROM producten WHERE subject_Id = " & sId
SET RS_products = conn.Execute(sSQL)

Response.Write(RS_producten.RecordCount)

What's wrong with this? I don't have a clue...

Thank you,
Steven
 
Probably to do with your cursor type, use AdOpenStatic with your connection Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Indeed, it was the cursortype I forgot. Now it works.

Thanks!!!

Steven
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top