|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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 %> |
|
#2
|
|||
|
|||
|
Try looking for some pagination tutorials on www.4guysfromrolla.com
|
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > ASP/ADO RecordSet Pagination Problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|