MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

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:
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  
Old August 16th, 2004, 01:46 PM
Blob Blob is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 12 Blob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Recordset types

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 %>

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > Recordset types


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