sqlpaginationasp-classic

Current Recordset does not support bookmarks


I have this ASP classic code that will return a set of records (recordset):

adoRs.Open "EXEC SP_SelectFromTable", adocn, 1

Its obviously from a Stored Procedure source. Now I use a AbsolutePage property for pagination function but it cause an 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.

But when I changed it to a simple select statement like below. It work just fine.

adoRs.Open "SELECT * FROM tblSample", adocn, 1

Any concept I'm missing?


Solution

  • When I first started working with ADO in ASP I ad the same problem. Most of the easy to find documentation mentions setting the cursor type of the recordset object. But on our servers, I actually have to set it on my connection object to get it to work (never really figured out why).

    So on my applications I set it on my connection object like this:

    adocn.CursorLocation = adUseClient
    

    Then I can set my recordset as:

    adoRs.CursorType = adOpenStatic