Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

maubiasotto

ADODB.Field error '800a0bcd'

Recommended Posts

Alguem sabe como arrumar esse erro?ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /sistema/admin/financeiro/relatorios/previ_fluxo/view1.asp, line 214 set rs = CreateObject("ADODB.RecordSet") rs.CursorLocation = 3 'adUseClient rs.CursorType = 3 'adOpenStatic sql = "SELECT SUM(tbl_credito_cond_ctrl.valor) AS total FROM tbl_credito_cond_ctrl" sql = sql&" INNER JOIN tbl_credito_cond ON (tbl_credito_cond_ctrl.id_cred = tbl_credito_cond.id)" sql = sql&" WHERE tbl_credito_cond.edf="&codedf&" AND tbl_credito_cond_ctrl.pago='Y'" sql = sql&" AND tbl_credito_cond_ctrl.data_pgto BETWEEN '0000-00-00' AND '"&tempo_saldo2&"'" rs.open conexao.execute(sql) if isnull(rs("total")) then response.Write("Mau Sim") else response.Write("Mau Não") soma_c2 = rs("total") -------- linha 214 End if rs.close set rs=nothing

Compartilhar este post


Link para o post
Compartilhar em outros sites

Simples, sua consulta veio vazia, acrescente um IF NOT SeuRS.EOF Then "abraçando" seu if de teste.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Troca isso

if isnull(rs("total")) thenresponse.Write("Mau Sim")elseresponse.Write("Mau Não")soma_c2 = rs("total") -------- linha 214End if

Por Isso

if Not Rs.Eof then if isnull(rs("total")) then response.Write("Mau Sim") else response.Write("Mau Não") soma_c2 = rs("total") -------- linha 214 End ifelse Response.write ("Mau Sim")End if

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá mano SALGADO.

E neste código abaixo, oque pode ser?
O que tu encherga de errado aqui.

Dá o seguinte erro:

 

ADODB.Field error '80020009'

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

/site/paginacao/paginacao7.asp, line 0

 

MEU CODIGO:

<!-- #include file="../../site/assets/includes/include_conexao.asp" -->
<!-- #include file="../../site/assets/includes/include_dataehora.asp" -->
<!-- #include file="../../site/assets/includes/include_limpahtml.asp" -->
<!-- #include file="../../site/assets/includes/include_injection.asp" -->
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="generator" content="Mobirise v2.10, mobirise.com">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="assets/images/logo-310x210-13-189x128-61.png" type="image/x-icon">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:700,400&subset=cyrillic,latin,greek,vietnamese">
    <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="assets/socicon/css/socicon.min.css">
    <link rel="stylesheet" href="assets/mobirise/css/style.css">
    <link rel="stylesheet" href="assets/mobirise-slider/style.css">
    <link rel="stylesheet" href="assets/mobirise/css/mbr-additional.css" type="text/css">

    <%
       SET VD_RS = Server.CreateObject("ADODB.RECORDSET")
        conn.CursorLocation = 3
       VD_RS.PageSize = 30
       VD_RS.OPEN "SELECT * FROM noticias ORDER BY id DESC", conn, 3,3

IF VD_RS.BOF THEN
   Response.Write("Não existem registros no momento para mostrar.")
       
   ELSE

        PaginaAtual = CInt(Request.Querystring("codigodapagina"))

        IF PaginaAtual = 0 THEN
           PaginaAtual = 1
        END IF

        VD_RS.AbsolutePage = PaginaAtual
                  Contagem = VD_RS.PageCount

        WHILE NOT VD_RS.EOF AND VD_RS.AbsolutePage = PaginaAtual
                  VD_RS.MoveNext : WEND

               Anterior = PaginaAtual - 1
                Proximo = PaginaAtual + 1

                    IF Anterior <= 0 THEN
                       Anterior = 1
                    END IF

                    IF Proximo > VD_RS.PageCount THEN
                       Proximo = VD_RS.PageCount
                    END IF
%>

        <table border="0" cellpadding="0" cellspacing="2" width="100%">
            <tbody>
                <tr>
                    <td class="classFonte01" bgcolor="#ebebeb" height="30" width="44%"><strong>ID</strong></td>
                    <td class="classFonte01" bgcolor="#ebebeb" width="47%"><strong>TITULO</strong></td>
                </tr>
                <tr>
                    <td class="classFonte01" bgcolor="#f7f7f7" height="22">
                        <% Response.Write(VD_RS("id")) %>
                    </td>
                    <td class="classFonte01" bgcolor="#f7f7f7">
                        <% Response.Write(VD_RS("titulo")) %>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="classFonte01" align="right" bgcolor="#ebebeb" height="30"><strong>Paginas:</strong>
                        <% 
                           NumeroDaPaginacao = 1 
                               WHILE NumeroDaPaginacao 
                                   VD_RS.PageCount
                                           IF PaginaAtual = NumeroDaPaginacao THEN 
                                                 Response.Write("["&NumeroDaPaginacao&"]") 
                                                      ELSE 
                                                 Response.Write("<a href='paginacao7.asp?codigodapagina="&NumeroDaPaginacao&">"&NumeroDaPaginacao&"</a>'") 
                                           END IF 
                                                 NumeroDaPaginacao = NumeroDaPaginacao + 1 
                                   WEND 
END IF 
                        %>
                    </td>
                </tr>
            </tbody>
        </table>

Se puder ajudar, tentei colocar no início IF NOT VD_RS.EOF THEN, mas nem assim funciona, não enchergo nada de errado, existem 4 registros no banco, mas não traz nada...

Desde já, obrigado.
Um abraço.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.