Friday, April 13, 2012

Paging in Classic ASP

ConnectionString ="DSN=DataSourceName"
SQLS = "SELECT * FROM TableName"

Set PRS = Server.CreateObject("ADODB.Recordset")
PRS.CursorLocation = 3 ' adUseClient
PRS.PageSize = 10
PRS.Open SQLS, ConnectionString

CurrentPage = 1
PRS.AbsolutePage = CurrentPage
Do While Not ( PRS.Eof Or PRS.AbsolutePage <> CurrentPage )
    PRS.MoveNext
Loop
PRS.Close
set PRS = nothing

References:
http://support.microsoft.com/kb/202125
http://www.codeproject.com/Articles/619/ADO-Recordset-Paging-in-ASP

The Big Glossary of Open Source JavaScript and Web Frameworks with Cool Names

http://www.hanselman.com/blog/TheBigGlossaryOfOpenSourceJavaScriptAndWebFrameworksWithCoolNames.aspx