Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 910
Stuart Avatar asked Jan 27 '14 11:01

Stuart


1 Answers

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
like image 110
Gary Richter Avatar answered Nov 04 '22 21:11

Gary Richter