Jeg har et andet paging system, som er uafhængie af databasen.
Set rs = Conn.Execute("SELECT * FROM table ORDER BY id DESC")
Set count = Conn.Execute("SELECT COUNT(id) AS records FROM table")
strPageSize = 10
strRecords = count("records")
strPages = strRecords/strPagesize
strPagesRound = Round(strPages)
strPagesDiff = strPages-strPagesRound
IF strPagesDiff > 0 THEN
strPages = strPagesRound+1
ELSE
strPages = strPagesRound
END IF
intPage = Request.Querystring("page")
IF isNumeric(intPage) = FALSE OR intPage < 1 THEN
intPage = int(1)
END IF
IF intPage > 1 THEN
strStart = intpage*strPageSize
strStart = strStart-strPageSize
strEnd = intpage*strPageSize
ELSE
strStart = 0
strEnd = strPageSize
END IF
strRecCount = strStart
rs.Move strStart
DO UNTIL strRecCount >= strEnd OR rs.EOF
'***********Indhold her
rs.MoveNext
strRecCount = strRecCount+1
LOOP
Response.Write "<table width='100%' cellspacing='1' cellpadding='0'>"
Response.Write "<tr>"
Response.Write "<td width='33%' align='right'>"
IF intPage > 1 THEN
Response.Write "<a href='?page=" & intPage-1 & "'><< Forrige</a>"
END IF
Response.Write "</td>"
Response.Write "<td width='34%'>"
Response.Write "<center>"
FOR i=1 TO strPages
IF i = int(intPage) THEN
Response.Write " <b>" & i & "</b> "
ELSE
Response.Write " <a href='?page=" & i & "'><b>" & i & "</b></a> "
END IF
NEXT
Response.Write "</center>"
Response.Write "</td>"
Response.Write "<td width='33%' align='left'>"
IF NOT int(intPage) >= int(strPages) THEN
Response.Write "<a href='?page=" & intPage+1 & "'>Næste >></a>"
END IF
Response.Write "</td>"
Response.Write "<tr>"
Response.Write "</table>"
Det skulle ikke give problemer.
**********
F. Mahmood