The Easiest Way for Recordset Paging Using ADO GetString

The Easiest Way for Recordset Paging Using ADO GetString

The following subroutine requires two parameters

1) Recordset

2) Count of records per page. For example:

     Call EasyPaging(Rs,10)<%Sub EasyPaging(MyRecordset,RecordsperPage) Dim CurrentPage,Myurl Myurl=Request.ServerVariables("script_name") MyRecordset.PageSize = RecordsperPage:MyRecordset.CacheSize =RecordsperPage 'get the current page number CurrentPage = Request.QueryString("Page") If CurrentPage = "" Or CurrentPage = 0 Then CurrentPage = 1 MyRecordset.AbsolutePage = CurrentPage 'write the content with Response   .Write ""   .Write ""  For Each myfld In MyRecordset.Fields   .Write ""  Next   .Write ""   .Write "", "
" & myfld.Name & "
" 'use getstring .write MyRecordset.GetString(2, RecordsperPage, _"
", " ") .Write "
" If CInt(CurrentPage) > 1 Then .Write "  " End If If CInt(CurrentPage) < MyRecordset.PageCount Then .Write "Next>" End If End WithEnd Sub%>
See also  Why ChatGPT Is So Important Today

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist