ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old July 21st, 2003, 12:18 PM
DevRR1005K DevRR1005K is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Washington DC
Posts: 6 DevRR1005K User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 31 sec
Reputation Power: 0
Send a message via AIM to DevRR1005K
ASP/ADO RecordSet Pagination Problem

I have tried to install a pagination routine for a recordset listing. I had used this code (below) for something similar using MS SQL7 database, and the pagination worked fine.

This time Im accessing from Oracle 8i, and receiving cryptic error messages ie
"Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype"

A collegue belives that the built-in ODBC cursor for Oracle is not a scrolling type, which means you can't seek on it. Without that feature, the recordset cannot support bookmarks.

Does anyone have a simple workaround for this? for example change the cursortype to forward or something? Im just not that much of an expert on ADO, and noone around here is. Below is the code.

<%
set connCallCards = server.CreateObject("ADODB.Connection")
connCallCards.Provider = "MSDAORA.1"
connCallCards.Open "Password=yadayada;User ID=fms;Data Source=dts2.world;Persist Security Info=True"
%>
<%
set RS3 = server.createobject("ADODB.Recordset")
RS3.CacheSize = 5
RS3.CursorLocation = 2

SQL3= "select credit_card_no, exten_no " _
& "from fts_inven_cc " _
& "where cust_no = '" & tscobac & "' " _
& "and cancel_date is null"

set RS3 = connCallCards.Execute(SQL3)

RS3.PageSize = 5
intPageCount=RS3.PageCount
Response.Write("test-rs3pagesize: " & RS3.PageSize) --------------> writes 5
Response.Write("<br>test-rs3pagecount: " & intPageCount)
-------> writes -1
Select Case Request.Form("Action")
Case "<<"
intPage = 1
Case " < "
intPage = Request.Form("intPage") -1
If intPage < 1 Then
intPage = 1
End if
Case " > "
intPage = Request.Form("intPage") + 1
If intPage > intPageCount Then
intPage = intPageCount
End If
Case ">>"
intPage = intPageCount
Case Else
intPage = 1
End Select

Response.Write("<br>test-intpage: " & intpage) -------------> writes 1
RS3.AbsolutePage = intPage -------------------------------------> produces page error: Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype
%>

Reply With Quote
  #2  
Old July 21st, 2003, 01:10 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,712 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 47 m 6 sec
Reputation Power: 688
Try looking for some pagination tutorials on www.4guysfromrolla.com

Reply With Quote
  #3  
Old July 21st, 2003, 02:51 PM
DevRR1005K DevRR1005K is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Washington DC
Posts: 6 DevRR1005K User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 31 sec
Reputation Power: 0
Send a message via AIM to DevRR1005K
doug,

yes that site did have some information about pagination, however, the code centered around ASP.NET not just ASP and recordset pagination.

Thanks anyways.

-paul

Reply With Quote
  #4  
Old July 21st, 2003, 05:26 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,712 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 4 Weeks 1 Day 23 h 47 m 6 sec
Reputation Power: 688
The message about "not supporting bookmarks" means you have a recordset that you can only traverse once. You need bookmarks for forward/backward navigation through the recordset. You could try using a client-side cursor location. Also I didn't see that you specified a cursor type, so you may be getting a forward-only recordset by default.

rs.open sql, con, 3, 3 usually works. The 3,3 are for adUseClient and adOpenStatic iirc, you can look up the ado constants in the ado library documentation.

Reply With Quote
  #5  
Old July 22nd, 2003, 08:15 AM
DevRR1005K DevRR1005K is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Washington DC
Posts: 6 DevRR1005K User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 31 sec
Reputation Power: 0
Send a message via AIM to DevRR1005K
rs.open sql, con, 3, 3

Doug,

rs.open sql, con, 3, 3

where would I specify this in the code?

Also, do you have any information about the client side cursor navigation?

Thanks for your help, you've pointed me in the right direction.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > ASP/ADO RecordSet Pagination Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway