Solved

Trying to Implement paging in classic asp.ADODB.Recordset error '800a0cb3' ,Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.

Posted on 2006-06-15
3
713 Views
Last Modified: 2008-02-01
Trying to Implement paging in classic asp.

Its gives me error that is below.

ADODB.Recordset error '800a0cb3' ,Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.

Here is my code.

Set rs= Server.CreateObject("ADODB.Recordset")
            
            
rs.CursorLocation = 3      'adUseClient
rs.CursorType = 3            'adOpenStatic

FormCmdObject "Sp_name"      '' FormCmdObject is a sub in my page which forms the command object                  
AddParameters cmd, "param1", advarchar, 10, m_val1 '' AddParameters is a sub which collects param
AddParameters cmd, "@param2", advarchar, 4000, val2
Set rs = cmd.Execute


            rs.PageSize = iPageSize
            rs.CacheSize = iPageSize


            iPageCount = rs.PageCount
            iFieldCount = rs.Fields.Count
            iRecordCount = rs.RecordCount

            If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
            If iPageCurrent < 1 Then iPageCurrent = 1

iRecordCount = iRecordCount - 1
iFieldCount  = iFieldCount - 1
LoopRecordCount = LoopRecordCount - 1

pageNum = Round(iRecordCount/iPageSize)
If pageNum < (iRecordCount/iPageSize) Then pageNum = pageNum + 1

If iPageCurrent = 1 Then      
      intPageNum =  pageNum
else      
      intPageNum =  iPageCurrent-1
end if

If iPageCurrent = pageNum Then      
      intPage = pageNum
else      
      intPage =  iPageCurrent+1
end if  

Please help.

Thanks.


0
Comment
Question by:r_pat72
  • 2
3 Comments
 
LVL 14

Expert Comment

by:CyrexCore2k
ID: 16915966
Try changing the cursor type to adOpenDynamic (Integer Value: 2) and see if that works.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 16917247
Unfortunately the questioner is using the Command object's Execute method to create the recordset so they cannot change anything.  For performance reasons, the only output available from the Execute method is a firehose (forward-only/read-only) cursor.

What they can do is change the method of opening the recordset to use the Recordset's Open method and use the Command object as the Source.  In that case they can define the CursorType as well as all other Recordset properties.
0
 
LVL 14

Accepted Solution

by:
CyrexCore2k earned 500 total points
ID: 16921118
Oh good call ac, I didn't really read his code

r_pat Do the following:
'----- BEGIN CODE -------
Set rs= Server.CreateObject("ADODB.Recordset")
         
rs.CursorLocation = 3     'adUseClient
rs.CursorType = 2          'adOpenDynamic

FormCmdObject "Sp_name"     '' FormCmdObject is a sub in my page which forms the command object              
AddParameters cmd, "param1", advarchar, 10, m_val1 '' AddParameters is a sub which collects param
AddParameters cmd, "@param2", advarchar, 4000, val2
rs.Open cmd
'----- END CODE -----------

and see if that fixes the problem.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Leverage browser caching 2 55
C# Gridview does not exist in the current context 14 63
Adding Datediff to staistics page 2 49
XML Parsing Classic ASP 5 49
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

919 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

14 Experts available now in Live!

Get 1:1 Help Now