Rs.Rowcount will return the number of records.
Make sure that your cursor is one that supports backwards movement, though, or else Rowcount will return -1.
ok -
i'm a little confused. Where are you trying to get the number of records, in the stored proc or on the ASP page?
in the stored proc, dianal is right by saying that @@ROWCOUNT will work.
On the ASP page you can use my method and it should return what you need, again as long as your cursor supports movement.
ex:
'assuming you have imported ADOVBS.inc again
'check FAQ333-618 for cursor info
oRs1.CursorType = adOpenStatic
well I've got the sql queries in a stored procedure, when I try it Dinal's way I get the error does not support this method. I got it working fine before I used stored procedures, I just called or.RecordCount and
I used oRS52.CursorLocation=3,
I've tried oRS2.CursorType=adOpenStatic this returns nothing.
MY aim is to first count the number of records returned then display the first 10 threads etc. How would I call the value from @@RowCount on the asp page
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.