Can someone take a look at the code to see where is the mistake because i can't display the 10 records of my database per page
<% Option Explicit
' ADO constants used in this page
Const adOpenForwardOnly = 0
Const adLockReadOnly = 1
Const adCmdTableDirect = &H0200
Const adUseClient = 3
%>
<html>
<head>
<style>
body { font-family : Verdana; font-size : 8pt; }
a { font-family : Verdana; font-size : 8pt;
text-decoration : none; }
</style>
</head>
<body>
<%
dim conn,x
set conn=Server.CreateObject("ADODB.Connection")
conn.open "sql"
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.PageSize = 10
rs.CacheSize = 5
rs.CursorLocation = adUseClient
rs.Open "select * from reservations", conn
If Len(Request("pagenum")) = 0 Then
rs.AbsolutePage = 1
Else
If CInt(Request("pagenum")) <= rs.PageCount Then
rs.AbsolutePage = Request("pagenum")
Else
rs.AbsolutePage = 1
End If
End If
Dim abspage, pagecnt
abspage = rs.AbsolutePage
pagecnt = rs.PageCount
If Not rs.EOF Then
Response.Write "PageCount : " & rs.PageCount & "<br>" & vbcrlf
Response.Write "Absolute Page : " & rs.AbsolutePage & "<br>" & vbcrlf
Response.Write "Total number of records : " & rs.RecordCount
Response.Write "<br><br>" & vbcrlf
end if
Dim fldF, intRec
Response.Write "<table border=1 align=center cellpadding=3 "
Response.Write "cellspacing=0><thead><tr>"
For Each fldF in rs.Fields
Response.Write "<td>" & fldF.Name & "</td>"
Next
Response.Write "</tr></thead><tbody>"
For intRec="1" To rs.PageSize
If Not rs.EOF Then
Response.Write "<tr>"
For Each fldF in rs.Fields
Response.Write ("<td>" & fldF.Value & "</td>")
Next
Response.Write "<tr>"
rs.MoveNext
End If
Next
Response.Write "</tbody></table><p>"
%>