• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 582
  • Last Modified:

Paging in ASP using Oracle

Hi All,
I want to include Paging in my Website. I m using ASP with Oracle...since oracle does not support (rs.AbsolutePage)
so wht's the otherway to do it...

The code is given below--
===================================================
<%
    dim thisPage, rowcount, i
   
    thisPage = Trim(Request("thisPage"))
    if thisPage = "" then thisPage = 1

    set cnn = server.CreateObject("ADODB.Connection")
    cnn.Open "Provider=MSDAORA.1;Password=aaa;User ID=aaa;Data Source=INDV;Persist Security Info=True"
   
    set rst = Server.CreateObject("ADODB.Recordset")
    with rst
        .CursorType = adOpenStatic
        .PageSize = 10
        .Open "SELECT *  FROM document_types ", cnn
        .AbsolutePage = cINT(thisPage)
    end with
       
    rowCount = 0
   
    while not rst.EOF and rowCount < rst.PageSize
        Response.Write "<a href='" & rst("DT_ID") & "'>" & rst("Document_Type") & "</a><br>"
        rowCount = rowCount + 1
        rst.MoveNext
    wend

    Response.Write "<br clear=all>Next Page >"

    for i = 1 to rst.PageCount
    %>
        <a href="Test.asp?thisPage=<%=i%>"><%=i%></a>
    <% next %>
============================================================

Regards,
Meenakshi Dhar
0
MeenakshiDhar
Asked:
MeenakshiDhar
1 Solution
 
hongjunCommented:
try using this

    set rst = Server.CreateObject("ADODB.Recordset")
    with rst
        .CursorLocation = 3 ' adUseClient
        .CursorType = adOpenStatic
        .PageSize = 10
        .Open "SELECT *  FROM document_types ", cnn
        .AbsolutePage = cINT(thisPage)
    end with



hongjun
0
 
MeenakshiDharAuthor Commented:
Thanks a lot hongjun.....
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now