Jag har problem med min sida, att när jag trycker på sid 2 i länken så visas ingenting.
Hoppas någon kan hjälpa mig här nu när jag sökt igenom hela google :-)
<%
NyhetPerSida = 20
URL = "/aktuellt/year2.asp"
db = Server.MapPath("/aktuellt/aktuellt.mdb")
%>
<head>
<link rel="stylesheet" href="/style.css" type="text/css">
</head>
<table cellpadding="1" cellspacing="0" width="100%" border="0">
<b>Aktuella händelser</b> | Se vad som hände år:
<%
For i = 2007 To 2003 Step - 1
Response.Write("<a href=year2.asp?datum="& i &">"& i &"</a> ")
Next%>
<p>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
Set RecSet = Server.CreateObject("ADODB.Recordset")
Sidan = Request.QueryString("sida")
If Sidan = "" then
sida = 1
Else
sida = Sidan
End If
With RecSet
.CursorLocation = 3
.CacheSize = NyhetPerSida
End With
sDatum = Request.QueryString("datum")
Select Case sDatum
Case "2003", "2004", "2005", "2006", "2007"
sql_datum=CInt(sDatum)
Case Else
sql_datum = "2008"
End Select
yearSQL = "SELECT \* FROM aktuellt WHERE YEAR(datum) = " & sql_datum & " ORDER BY id desc"
RecSet.Open yearSQL, Conn
If RecSet.EOF Then%>
<tr>
<td>Inga aktuella händelser inlagda!</td>
</tr>
<%Else
With RecSet
.MoveFirst
.PageSize = NyhetPerSida
.AbsolutePage = sida
End With
Sidor = RecSet.PageCount
x = 0
Do While Not RecSet.EOF And x < RecSet.PageSize
x=x+1
%>
<tr>
<td width="94%"><b><%=RecSet("rubrik")%></b> | <%=FormatDateTime(RecSet("datum"),2)%></td>
</tr>
<tr>
<td valign="top" colspan="2"><%=RecSet("nyhet")%></td>
</tr>
<tr>
<td valign="top" colspan="2"> </td>
</tr>
<%
RecSet.MoveNext
Loop
If Sidor > 1 Then%>
<tr>
<td valign="top" colspan="2">
<%For Sid = 1 To Sidor
If (Int(Sid)) = (Int(sida)) Then%><b>[<%=Sid%>]</b> <%Else%> [<a href="<%=URL%>?sida=<%=Sid%>"><%=Sid%></a>] <%End If
Next
End If
End If%>
<%
RecSet.Close
Set RecSet = Nothing
Conn.Close
Set Conn = Nothing
%>
</table>