You are currently browsing the tag archive for the 'Recordset.Move' tag.
Recordset.Move()
The Recordset.Move() technique was the first example I ever posted in this article. In an attempt to eliminate the need for heavy recordset objects, I decided to try the Move() method to skip the first n rows in the resultset to start at the first row for the page we are interested in.
<%
rstart = PerPage * Pagenum – (PerPage – 1)
dataSQL = “SELECT ArtistName, Title FROM SampleCDs WITH (NOLOCK)”
set rs = conn.execute(dataSQL)
if not rs.eof then
rs.move(rstart-1)
response.write “
| “ response.write artist & “ |
“ else response.write “ |
| “ end if response.write title & “ |
“
else
response.write “No rows found.”
response.end
end if
%>
This code can be found at:
http://databases.aspfaq.com/database/how-do-i-page-through-a-recordset.html
