Ir para conteúdo
Fórum Script Brasil
  • 0

[Resolvido] Que erro é esse ?


Renan 32

Pergunta

ADODB.Field error '80020009'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/admin/obras.asp, line 0

pessoal, estou montando uma paginção em ASP e aconteceu esse erro aí em cima...

o que pode ser?

vou enviar o código:

If pag = ("visualizar_fotos") Then
            %>
                    <div id="painel">
            <%
                        v_cod = CInt(Request.QueryString("cod_album"))
                        StrSql = "SELECT dbo.SitFotoObra.FOTcodigo, dbo.SitFotoObra.FOTdescricao, dbo.SitAlbum.ALBcodigo FROM dbo.SitFotoObra INNER JOIN  dbo.SitAlbum ON dbo.SitFotoObra.FOT_ALBcodigo = dbo.SitAlbum.ALBcodigo WHERE dbo.SitAlbum.ALBcodigo='" & v_cod & "'"
                        rs.open StrSql, con, 3, 3
                        rs.PageSize = 15

                        If rs.EOF Then
                            response.write "<p>Nenhuma foto cadastrada</p>"
                            Response.End 
                        Else
                            If Request.QueryString("paginacao") = "" Then 
                              intpagina = 1
                               Else
                                If Cint(Request.QueryString("paginacao")) < 1 Then
                                    intpagina = 1
                                  Else
                                    If Cint(Request.QueryString("paginacao")) > rs.PageCount Then  
                                        intpagina = rs.PageCount
                                     Else
                                        intpagina = Request.QueryString("paginacao")
                                    End if
                                  End if    
                               End if   
                        End if
            %>
                        <h2>Fotos Cadastradas</h2>
            <%
                           rs.AbsolutePage = intpagina 
                        intrec = 0
                        While intrec < rs.PageSize and not rs.EOF
              %>
                            <ul>
                                 <li>
                                 <%=rs("FOTdescricao")%> - <a href="obras.asp?pagina=editar_foto&cod_fot=<%=rs("FOTcodigo")%>"><img src="img/emp_editar.jpg" border="0" alt="Editar Foto" width="20" height="20"/></a> |<a href="#" onclick="java script:ExcluirFoto('obras.asp?pagina=excluir_foto&cod_fot=<%=rs("FOTcodigo")%>'); location.href  = 'obras.asp?pagina=visualizar_fotos';"><img src="img/emp_excluir.jpg" border="0" alt="Excluir Foto" width="20" height="20" /></a>| <a href="obras.asp?pagina=ver_foto&cod_fot=<%=rs("FOTcodigo")%>"><img src="img/emp_ver.jpg" border="0" alt="Visualizar Foto" width="20" height="20"/></a>
                                </li>
                            </ul>
            <%
                            rs.MoveNext
                            intrec = intrec + 1
                            If rs.EOF Then 
                               response.write "" 
                            End if   
                        Wend  
              %>
                              <br>
            <% 
                        If intpagina >1 Then 
            %> 
                            <a href="obras.asp?pagina=visualizar_fotos&cod_album=<%=rs("ALBcodigo")%>&paginacao=<%=intpagina-1%>"><img src="img/bluearrowleft.gif" alt="Página Anterior" border="0" width="15" height="15"></a> 
            <% 
                        End if
                            If StrComp(intpagina,rs.PageCount) <> 0 Then   
            %>
                                <a href="obras.asp?pagina=visualizar_fotos&cod_album=<%=rs("ALBcodigo")%>&paginacao=<%=intpagina + 1%>"><img src="img/bluearrowright.gif" alt="Próxima Página" border="0" width="15" height="15"></a>  
            <%
                            End if
                            rs.close
                            Set rs = Nothing
                                                          End If
            %>

abraços

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

Visitante
Este tópico está impedido de receber novos posts.


  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,2k
×
×
  • Criar Novo...