Hi I am having a problem when trying to page through my recordset basically i have set the pagesize to 3 and all records are displayed fine except for when selecting the last page returns an error saying "Exception Occured"
So far my code is as follows:
If the number of total records exceed the pagesize limit then write the values (for i = 1 to rs.pagesize)
Else
do until rs.eof
Now the problem here is since i have the pagesize set to 3 whenever the total number of records is greater than 9 it will cause that error on the last page since it cannot divide equally among 3 as there are 11 records
Here is my exact code:
<%
if rsreadforum.recordcount > rsreadforum.pagesize then
for i = 1 to rsreadforum.pagesize
response.write("Write some text")
rsreadforum.movenext
next
else
do until rsreadforum.eof
response.write("Write some text")
rsreadforum.movenext
loop
end if
%>
Please help me out i am restricted to having the right number of records to divide among the pagesize.