Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
744 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
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 …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

704 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