|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
I am migrating an application from Oracle to Ms SQL Server. In addition, I am using ASP to communicate with the databasre. My site works fine with Oracle but when I switch over to Ms SQL I get all kinds of crazy errors. I am especially concerned about my pagesize and pagecount functions on the website.
I get an ASP error saying that the provider/server does not support custom bookmarks or Ms SQL does not support custom bookmarks. Can anybody enlighten me about this issue? Do I have to modify my code or can I install a component or get it from somewhere to use it on the server. Here's the code: <% ' recordset paging If request("pageSize") <> "" Then pageSize = request("pageSize") Else pageSize = 10 End If If request("page") <> "" Then page = request("page") Else page = 1 End If ' execute an SQL query set rowSet = oracledb.Execute("SELECT * FROM product WHERE itemid BETWEEN 46 AND 52 ORDER BY title") ' make sure we're looking at the right page rowSet.PageSize = pageSize rowSet.AbsolutePage = page ' display the rows for this page counter = 0 do while ((rowset.eof = false) and (counter < rowSet.PageSize)) %> <font type=Arial color=orangered size=3> <b> <% response.Write(rowset.fields("Title"))%> </font> </b> <br> <font type=Arial color=A9A9A9 size=3> <b> <% response.Write(rowset.fields("SDescription")) %> </font> </b> <br> <% response.Write(rowset.fields("LDescription")) %> <br> Price $ <% response.Write(rowset.fields("SellingPrice")) %> <br> Amount in Stock: <% response.Write(rowset.fields("AmountInStock")) %> <br> <br> <% counter = counter + 1 rowset.Movenext loop %> <center> <font face="arial" size="2"> <% ' output the page and total pages response.Write("Page " & page & " of " & rowSet.PageCount) response.Write("<br><br>") ' don't add a prev page link if we're on the first page If page > 1 Then %> <a href="accessories.asp?page=<% =(page-1) %>&pageSize=<% =pageSize %>"> Previous page</a> <% End If ' add the whole list of links to all the pages If rowSet.PageCount > 1 Then For counter = 1 To rowSet.PageCount If counter = page Then response.Write(page) Else %> <A HREF="accessories.asp?page=<% =counter %>&pageSize=<%=pageSize %>"><% =counter %></A> <% End If Next End If ' don't add a next page link if we're already at the end of the rowset If page < rowSet.PageCount Then %> <a href="accessories.asp?page=<% =(page+1) %>&pageSize=<% =pageSize %>"> Next page</a><br> <% End If %> |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Recordset types |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|