paging ...
heyjeg bruger dette script fra activeserverpages.dk :
http://www.activeserverpages.dk/aspdigital/kapitel2/paging.asp?
MEN når jeg ændrer den lidt får jeg denne fejl:
Fejltype:
Der opstod en Microsoft VBScript-kompileringsfejl (0x800A03FB)
\'Loop\' var ventet
paging.asp, line 53
her er koden jeg bruger:
<html><head>
<title>Paging af et recordset</title>
</head><body>
<%
intPage = Request(\"page\")
If isNumeric(intPage) = False Or intPage < 1 Then
intPage = 1
End If
Set rsp = Server.CreateObject(\"ADODB.RecordSet\")
strSQL = \"SELECT * FROM bolig\"
strDSN = \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\"&Server.MapPath(\"log/bolignet.mdb\")
rsp.Open strSQL, strDSN, 1
If Not (rsp.BOF Or rsp.EOF) Then
rsp.PageSize = 10
rsp.AbsolutePage = intPage
intRecCount = rsp.PageSize
intPageCount = rsp.PageCount
Response.Write \"<p><b>Side \" & intPage & \" af \" & intPageCount & \"</b></p>\"
Do While Not rsp.EOF And intRecCount > 0
sagsnr = rsp(\"sagsnr\")
adresse = rsp(\"adresse\")
postnr = rsp(\"postnr\")
by = rsp(\"bynavn\")
boligtyp = rsp(\"boligtyp\")
vaerelse = rsp(\"vaerelse\")
m2 = rsp(\"m2\")
netto = rsp(\"netto\")
brutto = rsp(\"brutto\")
kontant = rsp(\"kontant\")
%>
<tr><td>
<table width=\"1000\" align=left cellspacing=0 class=\"table5\" onmouseout=\"this.className=\'table5\';\" onmouseover=\"this.className=\'table6\';\">
<tr><a href=\"<%=sagsnr%>\">
<td width=\"10\"> </td>
<td width=\"120\"><%=adresse%></a></td>
<td width=\"40\"><%=postnr%></a></td>
<td width=\"60\"><%=bynavn%></a></td>
<td width=\"50\"><%=boligtyp%></a></td>
<td width=\"30\" align=right><%=vaerelse%></a></td>
<td width=\"40\" align=right><%=m2%></a></td>
<td width=\"40\" align=right><%=netto%></a></td>
<td width=\"40\" align=right><%=brutto%></a></td>
<td width=\"60\" align=right><%=kontant%></a></td>
</a>
</tr>
</table>
</td></tr>
<p>
<%
intRecCount = intRecCount - 1
rsp.MoveNext
Loop
End If
rsp.Close
Set rsp = Nothing
Response.Write \"<p>Gå til side \"
For intNum = 1 To intPageCount
Response.Write \"<a href=paging.asp?page=\" & intNum & \">\" & intNum & \"</a> \"
Next
Response.Write \"<p>\"
If Clng(intPage) > 1 Then
Response.Write \"<a href=paging.asp?page=\" & intPage - 1 & \"><<</a>\"
Else
Response.Write \"<<\"
End If
Response.Write \" \"
If Clng(intPage) < Clng(intPageCount) Then
Response.Write \"<a href=paging.asp?page=\" & intPage + 1 & \">>></a> \"
Else
Response.Write \">>\"
End If
%>
</body></html>
Er der nogen der kan hjælpe?
-- xs
