Hi,<BR> Can anyone tell me if there is an inbuilt function in VBScript which counts the amount of records in the a recordset?<BR>Thanks<BR>Ger
Test the value of .RecordCount<BR><BR>MyCount=MyRs.RecordCount
true, but make sure you don't use a forward-only cursor, or you will get a nice -1 as result :)<BR>Read the The Databases, Errors category FAQ from this (great) site<BR><BR>http://www.aspfaqs.com/aspfaqs/ShowCategory.asp?CatID=21
if rs is a recordset means,<BR>rs.recordcount
use recordset cursor type as adpoendynamic.<BR>otherwise it will return -1.
It is returning -1..how do I use the cursortype as an adoendynamic???
rs.open str, myconn, 3 (with the "3" you won't get the -1 anymore)<BR>then <BR>rs.recordcount