jag får problem med Paging
jag får felmedelandet
Microsoft VBScript compilation error '800a0400'
Expected statement
line 32
With RecSet
.CursorLocation = 3
.CacheSize = perSida
End With
Min kod ser ut
Dim funktion
Funktion = dbkoppling
Dim objCommand, objRS
Dim connect, RecSet
const perSida = 20
Sidan = Request.QueryString("sida")
If Sidan = "" then
sida = 1
Else
sida = Sidan
End If
With RecSet
.CursorLocation = 3
.CacheSize = perSida
End With
Set RecSet = Server.CreateObject("ADODB.Recordset")
Addera = "Select * From inlogningar"
RecSet.Open Addera, Connect, adOpenStatic, adLockOptimistic
%>
start table
meny rad
With RecSet
.MoveFirst
.PageSize = perSida
.AbsolutePage = sida
End With
Sidor = RecSet.PageCount
Count = 0
Do While Not RecSet.EOF And Count < RecSet.PageSize
Utskrift
Count = Count + 1
RecSet.MoveNext
Loop
' Wend
RecSet.Close
Set RecSet = Nothing
%>
</TABLE>
<%
If Sidor = 1 Then%>
<%Else%>
<%End If%>
<%If Sidor <> 1 Then%>
<%For Sid = 1 To Sidor%>
<%If (Int(Sid)) = (Int(sida)) Then%><%=Sid%><%Else%> <a href="default.asp?sida=<%=Sid%>"><%=Sid%></a> <%End If%>
<%Next%>
<%End If%>
</td>
</tr>
</table>