There are two ways of doing it:
1)select maximum records from query itself
Set rs = connectionobj.execute("select count(*) from Employee")
2) Using Recordset's Record count property. RecordCount property returns the
exact number of records fetched. RecordCount property returns -1 for forward
only cursor, exact count for static and openkeyset cursors and -1 or exact
count for dynamic cursors. If your recordset doesnt need dynamic data (ie.,
data updated by concurrent users), you can always open the recordset using
openkey set cursor and fetch the number of records using RecordCount property
of the recordset.
Herez a sample
Rs.open "Select * from Employee", strProvider, adOpenKeySet, adCmdText
Dim recCount
recCount = Rs.RecordCount
Thanks,
Sreenath.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/