ASP Access Recordset Paging

Discussion in 'ASP General' started by Yosi, Aug 5, 2008.

  1. Yosi

    Yosi Guest

    Hi all,

    I have access database file with 2 tables,
    the tables have the same columns but with different data,
    and I have 2 asp files that show the content of each table with paging
    recordset,
    they have the same code, but only one asp works,
    when I try to open the second page i got this error:

    Error Type:
    ADODB.Recordset (0x800A0CB3)
    Current Recordset does not support bookmarks.
    This may be a limitation of the provider or of the selected cursortype.

    it doesn't make sense how one asp page with the same code working,
    and the other not, any idea wht it happend ?

    the code:

    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.mode = 3
    FilePath = "C:\Inetpub\wwwroot\database.mdb"
    Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath & ";
    Set RS = Server.CreateObject("ADODB.Recordset")
    RS.CursorType = adOpenStatic
    RS.PageSize = 5
    RS.Open "SELECT * FROM table1", Conn
    RS.AbsolutePage = cp
    rc = 0
    While not RS.EOF and rc < RS.PageSize
    response.write RS("FirstName") & "<br>"
    RS.MoveNext
    Wend
    RS.Close
    SET RS = NOTHING
    Conn.close
    Set Conn = NOTHING

    Many thanks in advance,

    Yosi.
    Yosi, Aug 5, 2008
    #1
    1. Advertising

  2. Yosi wrote:
    > Hi all,
    >
    > I have access database file with 2 tables,
    > the tables have the same columns but with different data,
    > and I have 2 asp files that show the content of each table with
    > paging recordset,
    > they have the same code, but only one asp works,
    > when I try to open the second page i got this error:
    >
    > Error Type:
    > ADODB.Recordset (0x800A0CB3)
    > Current Recordset does not support bookmarks.
    > This may be a limitation of the provider or of the selected
    > cursortype.
    > it doesn't make sense how one asp page with the same code working,
    > and the other not, any idea wht it happend ?


    Well, there has to be something different ...

    >
    > the code:
    >
    > Set Conn = Server.CreateObject("ADODB.Connection")
    > Conn.mode = 3
    > FilePath = "C:\Inetpub\wwwroot\database.mdb"
    > Conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & FilePath
    > & ";


    Probably nothing to do with your problem but ...
    http://www.aspfaq.com/show.asp?id=2126

    > Set RS = Server.CreateObject("ADODB.Recordset")
    > RS.CursorType = adOpenStatic


    This cursor type should be supporting bookmarks. Verify that the provider
    was able to give you this cursor type by checking it after you open the
    recordset:

    Response.Write RS.CursorType

    > RS.PageSize = 5
    > RS.Open "SELECT * FROM table1", Conn


    Again, nothing to do with your problem but:
    http://www.aspfaq.com/show.asp?id=2096

    There seems to be no reason not to use a disconnected client-side cursor
    here:

    RS.CursorLocation = 3 'adUseClient
    RS.PageSize = 5
    RS.Open "SELECT * FROM table1",,, Conn, 1
    Set RS.ActiveConnection = Nothing
    Conn.Close

    RS.AbsolutePage = cp
    etc.


    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Aug 5, 2008
    #2
    1. Advertising

  3. Yosi

    e.l. Guest

    Hi,

    I'm having a different problem, but the same error message (ADODB.Recordset
    (0x800A0CB3) ).

    I tried what you suggested, to verify that the provider gave me the cursor
    type I had written.

    So here's what i wrote:
    rs.open sqlStr, con, 3,3

    and i got cursor type=0, locktype=1.

    Why is that? and what can I do about it?
    e.l., Aug 25, 2008
    #3
  4. e.l. wrote:
    > Hi,
    >
    > I'm having a different problem, but the same error message
    > (ADODB.Recordset (0x800A0CB3) ).
    >
    > I tried what you suggested, to verify that the provider gave me the
    > cursor type I had written.
    >
    > So here's what i wrote:
    > rs.open sqlStr, con, 3,3
    >
    > and i got cursor type=0, locktype=1.
    >
    > Why is that? and what can I do about it?


    We can't answer without seeing:
    1. your database type and version
    2. your connection string
    Here is the key line in the CursorType article in the documentation:
    "If a provider does not support the requested cursor type, it may return
    another cursor type. "
    That is why we need to see your connection string

    3. the code used to instantiate your recordset and set its intial
    properties
    4. it might help to see what is contained in sqlStr

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Aug 25, 2008
    #4
  5. Yosi

    e.l. Guest

    Thanks for the quick reply.

    1. I use MS Office Access 2003 (11.8166.8202) SP3

    2. The code of my connection to the DB and the RS:

    dim SQLstr
    set con = server.CreateObject ("adodb.connection")
    con.open "provider = microsoft.jet.oledb.4.0; data source = c:\ak\Akel.mdb"

    set rs = server.CreateObject ("adodb.recordset")
    SQLstr = "SELECT * FROM tblProperty"
    rs.Open SQLstr, con, 3,3
    e.l., Aug 25, 2008
    #5
  6. e.l. wrote:
    > Thanks for the quick reply.
    >
    > 1. I use MS Office Access 2003 (11.8166.8202) SP3
    >
    > 2. The code of my connection to the DB and the RS:
    >
    > dim SQLstr
    > set con = server.CreateObject ("adodb.connection")
    > con.open "provider = microsoft.jet.oledb.4.0; data source =
    > c:\ak\Akel.mdb"


    You are not using odbc, so you should have removed those groups from the
    crosspost.
    >
    > set rs = server.CreateObject ("adodb.recordset")
    > SQLstr = "SELECT * FROM tblProperty"
    > rs.Open SQLstr, con, 3,3


    I haven't used Access in a while and I don't have time to test this,
    but, from what I can see, you should be getting a static server-side
    cursor with optimistic locking. I really cannot see why the provider is
    giving you the default forward-only, read-only cursor. My suggestion
    would be to change the cursor location to adUseClient (3) which will
    force a static cursor to be opened.

    Oh, and make sure all database users have Modify permissions for that ak
    folder. If your website uses Anonymous access, then the
    IUSR_<machine_name> account needs to be granted that permission.

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Aug 25, 2008
    #6
  7. Yosi

    e.l. Guest

    Thanks a lot! You've been really helpful.

    What eventually solved the problem was moving the DB from
    C:\akel\akel.mdb
    to
    D:\akel\akel.mdb

    I still don't understand why I didn't have access to disc C.
    e.l., Aug 25, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dima

    Recordset Paging between frames

    Dima, Jul 22, 2003, in forum: ASP General
    Replies:
    1
    Views:
    109
    Ray at
    Jul 22, 2003
  2. Hung Huynh
    Replies:
    8
    Views:
    298
    Bob Barrows
    Sep 24, 2003
  3. sara

    recordset paging

    sara, Apr 12, 2005, in forum: ASP General
    Replies:
    3
    Views:
    111
    Bob Barrows [MVP]
    Apr 13, 2005
  4. Ing. Branislav Gerzo

    ADO recordset paging

    Ing. Branislav Gerzo, Jun 24, 2005, in forum: ASP General
    Replies:
    3
    Views:
    142
    Bob Barrows [MVP]
    Jun 24, 2005
  5. alan
    Replies:
    3
    Views:
    132
    Bob Barrows [MVP]
    Jun 20, 2006
Loading...

Share This Page