Paging in ASP using Oracle

Posted on 2005-04-27
Last Modified: 2008-02-01
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

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

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

Meenakshi Dhar
Question by:MeenakshiDhar
    LVL 33

    Accepted Solution

    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


    Author Comment

    Thanks a lot hongjun.....

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now