Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - page count using oracle
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

page count using oracle

 Post Reply Post Reply
Author
amisima View Drop Down
Newbie
Newbie


Joined: 09 June 2003
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote amisima Quote  Post ReplyReply Direct Link To This Post Topic: page count using oracle
    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
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gullanian Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
amisima View Drop Down
Newbie
Newbie


Joined: 09 June 2003
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote amisima Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post 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
Soft 4 web
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.