Help Needed DoPaging

This is a discussion on "Help Needed DoPaging" within the Classic ASP section. This forum, and the thread "Help Needed DoPaging are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 17th, 2006, 11:35
New Member
Join Date: Nov 2006
Location: Cardiff
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Help Needed DoPaging

Hi all new to this
Hope someone can help me out on this I have an inc.asp file that I have been trying for ages to wrok around for doing paging Code attached Anyone HELP as the vendors of the product seem to have taken the money and run..........

<%
Public page
function GetDatabaseConn()
dim Conn, title
set Conn = server.createobject("ADODB.connection")
Conn.ConnectionString = "Provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("database/db1.mdb")
Conn.Open
set GetDatabaseConn = Conn
title=
"My site"
End
function
Function DoPaging(refRS)
If refRS.Pagecount >
1 then
DOPaging = "Page No. "
For each Item in Request.QueryString
If item
<> "pg" AND item <> "Message" Then strPass = strPass & item & "=" & request.querystring(item) & "&"
Next
For pg = 1 to refRS.Pagecount
If pg = page then
DoPaging = DoPaging & pg
Else
DoPaging = DoPaging & "<A HREF=" & Request.ServerVariables("PATH_INFO") & "?" & strPass &"pg=" & pg & ">" & pg & "</A>"
End If
If pg <> refRS.pagecount then DoPaging = DoPaging & " - "
Next
End If
End Function
sub openrs(rstemp, strsource)
With rstemp
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.ActiveConnection = conn
.Open (strsource)
End With
If pagesize <> "" and NOT(rstemp.EOF) then
page=FixInt(Request.QueryString("pg"))
rstemp.PageSize = pagesize
If page=0 then page=1
rstemp.AbsolutePage= page
end if
end sub
Function FixInt(strNum)
If IsNull(strNum) OR Not(IsNumeric(strNum)) Then
FixInt=0
Else
FixInt=CDBL(strNum)
End If
End Function
%>

The inc file is being called from a post it page and preview works fine but not listing the paging.. any ideas out there???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Reply

Tags
dopaging

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Designers needed, cloners needed. TargeTemplate Job Opportunities 0 Dec 27th, 2007 03:41
SEO Help Needed Merlin Search Engine Optimization (SEO) 20 Sep 3rd, 2007 07:26
Help needed with <div> tag allstar Web Page Design 6 Dec 8th, 2005 20:25
help needed stargazer Hosting & Domains 1 Sep 11th, 2005 16:10


All times are GMT. The time now is 03:59.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42