Home | Advertising Info56 USERS CURRENTLY ONLINE   
   Site Search Contact Us Friday, March 14, 2025  
 
 


 
ASPProtect
User Management Application with web based screens that allow you to manage users.
www.ASPProtect.com
 
ASPBanner
Banner Rotation system. Advertisers can monitor online statistical reports via their web browsers.
www.ASPBanner.com
 
ASP Photo Gallery
Upload an unlimited amount of albums. Set up categories.Image resizing thumbnail creation.
www.ASPPhotoGallery.com
 
ASPClassifieds
Classifieds system. Set up categories. Users can register themselves. Supports picture uploads.
www.ASPClassifieds.com



DISCUSSION ARCHIVES
 



We didn't realize
the site was so popular.

Other Stuff
 

 
 
Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds



(Advanced)  (Components)  (Database)  (General)  (Vbscript)




ASPProtect

 
Subject: Re: Problem with RecordCount
From: Raymond Skorstad
Date: 8/26/1999 7:23:04 AM
IP: 139.109.4.129



 

If the recordset doesnt support adApproxPosition or adBookmark, you cant use recordcount, even if you use adStatic.

To test if your recordset, do:

If rst.Supports(adBookmark) Or rstStat.Supports(adApproxPosition) Then
response.write "Recordset will work!"
else
response.write "Recordset doesnt work!"
End If

In order to tell if you have records in the recordset, simply test:

if rs.Eof then
recordset empty
else
recordset not empty
end if

if you need to actually count the records, youd need to either run through the recordset and count:

dim nCount
nCount=0
do while not rs.Eof
ncount=nCount+1
rs.MoveNext
loop
nCount=nCount-1
response.write nCount&" records read."


or you could create a stored procedure on the server (if SQL) to return the count, or run:

strSql="SELECT count(*) FROM sak"
rs.Open strSql, con
Response.write "Recordcount= "&rs(0)

The last one is definitely the best and quickest on!

Check www.delphi.com/myasp for tips

Previous Message


 

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright Š 1998 - 2025 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages what is asp programming how to sample asp example code scripts software asp forum mail sessions applications global.asa CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com