Ciao al forum.
Sto cercando di paginare gli interventi registrati in un guestbook ed ho questo codice che nella riga rossa restituisce quest'errore, sapete illuminarmi ?
Codice di paginazione:ADODB.Recordset error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/index.asp, line 199
codice:<% ACTION = Request.Querystring("ACTION") %> <% PAGE = CInt(Request.Querystring("PAGE")) %> <% RCOUNT = CInt(Request.Querystring("RCOUNT")) %> <% If RCOUNT = "" Then %> <% RCOUNT = "0" %> <% End If %> <% Set objRS = server.CreateObject("ADODB.Recordset") MySQL = "SELECT * from TBL_BOOK ORDER BY DATE_ENTERED DESC" objRS.Open MySQL, objConn %> <% RECXPAG = 1 %> <% objRS.PageSize = RECXPAG %> <% If ACTION = "FORWARD" Then %> <% PAGE = PAGE + 1 %> <% RCOUNT = RCOUNT + RECXPAG %> <% For DACOUNT = 1 To RCOUNT %> <% objRS.MoveNext %> <% Next %> <% End If %> <% If ACTION = "BACK" Then %> <% PAGE = PAGE - 1 %> <% RCOUNT = RCOUNT - RECXPAG %> <% If RCOUNT <> 0 Then %> <% For DACOUNT = 1 To RCOUNT %> <% objRS.MoveNext %> <% Next %> <% End If %> <% End If %> <% If RCOUNT = "0" Then %> <% PAGE = 1 %> <p align="center"><font face="Arial"> <% 'Totale dei record strSQL = "SELECT COUNT(*) FROM tbl_BOOK" Set objRec = objConn.Execute(strSQL) tot_record = objRec(0) set objRec = nothing %> <% If Cint(tot_record) > 1 or Cint(tot_record) = 0 Then %> <% =Cint(tot_record) %> </font><font face="Arial" size="1"> Interventi registrati </font><font face="Verdana" size="1" color="#000080"> <% Else %> <% =Cint(tot_record) %> </font><font face="Arial" size="1"> Interventi registrati</font><font face="Verdana" size="1" color="#000080"> <% End If %> </font><font face="Verdana" size="1" color="#FFFFFF"> <% If Cint(tot_record) <> 0 And RECXPAG < Cint(tot_record) Then %> Indietro <% = RECXPAG %> <% End If %></font></p> <% End If %> <div align="center"><center> <table border="0" width="400"> <tr> <td width="200"><% If RCOUNT > 0 Then %> <form method="PUT" action="default.asp"> <input type="hidden" name="ACTION" value="BACK"> <input type="hidden" name="RCOUNT" value="<% =RCOUNT %>"> <input type="hidden" name="PAGE" value="<% =PAGE %>"> <p align="center"><font face="Arial"> <input type="submit" value="Avanti"></font></p> </form> <% End If %> </td> <td width="200"><% If PAGE = objRS.PageCount Then %> <% Else %> <form method="PUT" action="default.asp"> <input type="hidden" name="ACTION" value="FORWARD"> <input type="hidden" name="RCOUNT" value="<% =RCOUNT %>"> <input type="hidden" name="PAGE" value="<% =PAGE %>"> <p align="center"><font face="Arial"><input type="submit" value="Avanti"></font></p> </form> <% End If %> </td> </tr> </table> </center></div>

Rispondi quotando

