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!

rs.RecordCount

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
PH
Hey I am unable to get recordcount to work in mysql and ASP, when I try it gives me back a -1 anyone know how to solve this? I also try SELECT column1,column2,count(*) as dbCount FROM ...

that returned 1 less record then there was. I would rather get recordcount working, because I want to do some paging.

www.vzio.com
ASP WEB DEVELOPMENT



 
To return the total number of records you could use the COUNT() like this:

strSQL = "SELECT COUNT(*) AS rowTotal FROM tbl_FOO"

If you have set RS to be your record set, retrive the value with: RS("rowTotal")

If it still returns -1, use: Option=16384 in your connection string.

If you haven't heard of it, then you most likely don't need it.
---------------------------------------------------------------------
---------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top