Print Page | Close Window

page count using oracle

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=4195
Printed Date: 30 March 2026 at 6:37am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: page count using oracle
Posted By: amisima
Subject: page count using oracle
Date Posted: 11 July 2003 at 11:09am
Hi,

I am trying to display 10 results per page and have links to next page. I am getting -1 as a page count. I am using rs.pagecount. I am using Oracle as my database, does the pagecount work with an oracle database?

Thanks,

Amisima



Replies:
Posted By: Gullanian
Date Posted: 11 July 2003 at 12:48pm
Not sure what your trying to do, if your writting your own code dont forget integers when defined are set to 0 as default, you might not be counting the 0 as a page.


Posted By: amisima
Date Posted: 11 July 2003 at 12:51pm
this is what I have and I get a -1

if rsa.eof= true then
Page_Count = 1
else
response.write(page_count)
Dim Record_Count
count = 1

Page_Count = rsa.PageCount
record_Count = rsa.RecordCount
response.write(page_Count)


Posted By: zaboss
Date Posted: 13 July 2003 at 7:12am

The problems with other dbs then access and MS SQL is that they can not handle the rs.recordcount or rs.absolutepage, so you have to adjust your code.

So, instead of rsa.recordcount you have to use something like (Select count (*) as numrecords from my db where...)

instead of rs.pagecount you must do something like

mypagescount = Round((left(allrecords,9) / pagesize)) + 1

then

record_Count = rsa("numrecords") and so on.



-------------
Cristian Banu
http://www.soft4web.ro - Soft 4 web



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net