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.
|
|
|
|
|
![]() |
||
Help Needed DoPaging
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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??? |
|
|
![]() |
| Tags |
| dopaging |
| Thread Tools | |
|
|
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 |