I have the following, but am getting -1 as the result and can't resolve it...any help would be appreciated. <% if objrecordset.Supports(adApproxPosition)=true then i=objrecordset.RecordCount response.write("The number of records is: " & i) end if %> Code (markup): i was reading a bunch of stuff on cursors being the problem, but can't figure out how to get that workion.\
You need to do a .movelast on your recordset before it will give you an accurate row count. I normally do a .movelast, then get the recordcount, then do a .movefirst Jay
Thanks, I actually went a different method - objRecordSet.Open strSQL, objt, adOpenstatic dim adsensebling adsensebling=objrecordset.recordcount 'response.write adsensebling Code (markup): also added the adovbs include, and this worked just fine for me!
Yes, it needs to be "adOpenstatic" in order for the count to work... If you don't want to include the advbs.inc file you can look up adOpenstatic and substitute the constant number in place of adOpenstatic