Need some help ErrorType: ADODB.Field (0x80020009)
Need some help here with this error....
Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/excel_registrashon/display_xrec_page.asp
This page should display 10 records per page out of the db. When the records are excactly 10, 20, 30, 40, 50, 60 etc, the pages displays without this error. If the records in the database is e.g. 12, 13, 33, 41, 57 etc this error comes.
What code is missing???
<%
'Link to database
dim rsHotspots,i,strConn,strTemp
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("_incl/registrashon.mdb")
'select data
Set rsHotspots = Server.CreateObject("ADODB.Recordset")
'choose available data
strSQL = "SELECT * FROM miembro;"
rsHotspots.CursorLocation=3 'clientside
rsHotspots.CursorType=3 'staticrecordset
rsHotspots.PageSize=10
'open recordset
rsHotspots.Open strSQL, adoCon
if Request.QueryString("pg")="" then
rsHotspots.AbsolutePage=1
else
rsHotspots.AbsolutePage=Request.QueryString("pg")
end if
For i=1 to 10
Response.Write "<table>"
response.write "<tr><td width= ""150"">"
Response.Write rsHotspots.Fields("nomber")
response.write "</td><td width= ""150"">"
Response.Write rsHotspots.Fields("fam")
response.write "</td><td width= ""150"">"
Response.Write rsHotspots.Fields("sekso")
response.write "<tr><td colspan=""3"" bgcolor=""#159FF6"" height=""3""></td></tr>"
Response.Write "</table>"
rsHotspots.MoveNext
response.write "</td></tr>"
Next
Response.Write "<p><table><tr>"
for i=1 to rsHotspots.PageCount
Response.Write "<td><a href='display_xrec_page.asp?pg=" & i & "'>" & i & "</a></td>"
next
Response.Write "</tr></table>"
%>
__________________
-------------------------
peace, luv and respect
|