Question

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?

Was it helpful?

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

OTHER TIPS

Once the recordset is opened the datatype of Bookmark will be changed to either Double or Integer according to the recordcount. Just assign the record number in the variable of that type then it will work fine...

Note:-To know type of bookmark use typename(rs.bookmark) after recordset is opened

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top