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
733 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

636 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