views:

22

answers:

1

It is very simple to do paging on access database (using absolute and pagesize) but I heard its hard to do paging on SQL Server database. How do I do I add simple paging to the following codes.

<%
    SQL = "SELECT I.IMAGESID, I.IMAGESNAME, I.IMAGESSMURL"
    SQL = SQL & " FROM IMAGES I"
    Set objImages = objConn.Execute(SQL)    
%>
                <div class="row">
                    <label for="Images">Images</label>
<%  Do While Not objImages.EOF  %>
                    <img src="<%=objImages("IMAGESSMURL")%>" alt="<%=objImages("IMAGESNAME")%>" border="0" />
<%
    objImages.MoveNext
    Loop
%>


<%
    objImages.close
    Set objImages = Nothing
%>
+1  A: 

Please see: SQL Server 2005 Paging – The Holy Grail (need to register[free]).

Mitch Wheat