varför funkar inte min "lilla" kod här?
det hakar upp sig på den rad markerad med fetstil:
<table>
<%
mypage = Request("whichpage")
If mypage = "" then
mypage = 1
End If
mypagesize = 10
SQL = "Select * From users Order by username"
Set rstemp = Server.Createobject("ADODB.Recordset")
rstemp.cursorlocation = 3
rstemp.cachesize = 5
MdbFilePath = Server.MapPath("users.mdb")
rstemp.open SQL, "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
If rstemp.EOF then
Response.write "Där fanns det ju inget... " & sok
Else
rstemp.movefirst
rstemp.pagesize = mypagesize
maxcount = Cint(rstemp.pagecount)
rstemp.absolutepage = mypage
howmanyrecs = 0
howmanyfields = rstemp.fields.count -1
Do While Not RStemp.EOF AND howmanyrecs < rstemp.pagesize
counter = counter + 1
If counter mod 2 = 0 then
color = "e16745"
Else
color = "F7F7E7"
End If
[b]Response.write "<tr bgcolor='" & color & "'><td><font face=""Verdana"" size=""1"" color=""black"">" & rstemp("username") & "<br>" & "<a href=""blikompis.asp?username=" & rstemp("username") & """>Bli kompis</a>" & " " & "<a href=""javascript: window.open('info.asp?id=" & rstemp("id"),",'status=yes,scrollbars=no,width='300',height='400'); & """>Info</a>" & " " & "<a href=""skickamess.asp?till=" & rstemp("username") & """>Skicka meddelande</a>" & "</td></tr></font>"[/b]
rstemp.movenext
howmanyrecs = howmanyrecs + 1
Loop
rstemp.close
Set rstemp = nothing
%>
<tr><td><img src="hr2.jpg" width="397" height="11" border="0"></td></tr>
<tr><td><font face="Verdana" size="1">
<%
If maxcount <> 0 then
response.write "sida " & mypage & " av " & maxcount & "<br>" & sidor:
pad = "0"
scriptname = request.Servervariables("script_name")
for counter = 1 to maxcount
If counter >= 10 then
pad = ""
End If
ref = "<a href='" & scriptname & "?whichpage=" & counter & "&pagesize=" & mypagesize & "'>" & pad & counter & "</a> "
response.write ref & " "
if counter mod 10 = 0 then
response.write "<br>"
End If
Next
End If
End If
%>
</td></tr>
</table>