...

View Full Version : Number of rows returned with a select?



Darksbane
08-07-2002, 02:36 PM
Is there a way to grab the number of rows returned in a select?

So say if I have

SQL = "Select * From someDB"
Set RS = DBconn.Execute(SQL)

is there some way to say RS.SOME_COMMAND and have it return the correct number?

I seem to recall doing this before (might have been in PHP though) but I just can't remember how.


Any help would be appreciated,

Darksbane

oracleguy
08-07-2002, 04:03 PM
Yeah from your recordset object:

object.RecordCount

Now if it gives your -1 then read this:

http://www.asp101.com/samples/db_count.asp

landon11
08-07-2002, 07:00 PM
You could also do this:

Select count(*) for someDB



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum