Ir para conteúdo

POWERED BY:

Arquivado

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

WRK_VLF

Erro ADODB.Field error '800a0bcd'

Recommended Posts

bom dia pessoal

 

 

Minha página de pedidos estã dando esse erro ai em baixo. quando seleciono um pedido para visualizar ele da 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.

 

/loja/admin/pedidos2.asp, line 338

 

 

LINHA 338

 

<td class="textopreto"><div align="left"><strong>Cliente: <%=(rsPedido.Fields.Item("Nome").Value)%> <%=(rsPedido.Fields.Item("Sobrenome").Value)%></strong></div></td>

 

ai quando coloco a verificação

 

<% if (not rsPedido.eof) then %>
<td class="textopreto"><div align="left"><strong>Cliente: <%=(rsPedido.Fields.Item("Nome").Value)%> <%=(rsPedido.Fields.Item("Sobrenome").Value)%></strong></div></td>

<% end if %>

ele naum da o erro mais também não aparece fica em branco a página

 

o que devo fazer???

 

 

 

Obrigado pela ajuda

Compartilhar este post


Link para o post
Compartilhar em outros sites

Está correto. Se não entra no IF é pq não existe registros.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Poste sua consulta SQL.

Compartilhar este post


Link para o post
Compartilhar em outros sites

<%@LANGUAGE="VBSCRIPT"%>

 

<!--#include file="../../Connections/info.asp" -->

<%

Dim MM_editAction

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))

If (Request.QueryString <> "") Then

MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)

End If

 

' boolean to abort record edit

Dim MM_abortEdit

MM_abortEdit = false

%>

<%

' IIf implementation

Function MM_IIf(condition, ifTrue, ifFalse)

If condition = "" Then

MM_IIf = ifFalse

Else

MM_IIf = ifTrue

End If

End Function

%>

<%

If (CStr(Request("MM_update")) = "form1") Then

If (Not MM_abortEdit) Then

' execute the update

Dim MM_editCmd

 

Set MM_editCmd = Server.CreateObject ("ADODB.Command")

MM_editCmd.ActiveConnection = MM_info_STRING

MM_editCmd.CommandText = "UPDATE infointime.tb_pedidosweb SET status = ? WHERE Codigo = ?"

MM_editCmd.Prepared = true

MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 5, 1, -1, MM_IIF(Request.Form("status"), Request.Form("status"), null)) ' adDouble

MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 5, 1, -1, MM_IIF(Request.Form("MM_recordId"), Request.Form("MM_recordId"), null)) ' adDouble

MM_editCmd.Execute

MM_editCmd.ActiveConnection.Close

 

' append the query string to the redirect URL

Dim MM_editRedirectUrl

MM_editRedirectUrl = "pedidos.asp"

If (Request.QueryString <> "") Then

If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then

MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString

Else

MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString

End If

End If

Response.Redirect(MM_editRedirectUrl)

End If

End If

%>

<%

' *** Logout the current user.

MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"

If (CStr(Request("MM_Logoutnow")) = "1") Then

Session.Contents.Remove("MM_Username")

Session.Contents.Remove("MM_UserAuthorization")

MM_logoutRedirectPage = "index.asp"

' redirect with URL parameters (remove the "MM_Logoutnow" query param).

if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))

If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then

MM_newQS = "?"

For Each Item In Request.QueryString

If (Item <> "MM_Logoutnow") Then

If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"

MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))

End If

Next

if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS

End If

Response.Redirect(MM_logoutRedirectPage)

End If

%>

<%

' *** Restrict Access To Page: Grant or deny access to this page

MM_authorizedUsers=""

MM_authFailedURL="index.asp"

MM_grantAccess=false

If Session("MM_Username") <> "" Then

If (true Or CStr(Session("MM_UserAuthorization"))="") Or _

(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then

MM_grantAccess = true

End If

End If

If Not MM_grantAccess Then

MM_qsChar = "?"

If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"

MM_referrer = Request.ServerVariables("URL")

if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()

MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)

Response.Redirect(MM_authFailedURL)

End If

%>

<%

Dim rsPedido__MMColParam

rsPedido__MMColParam = "1"

If (Request.QueryString("Cod") <> "") Then

rsPedido__MMColParam = Request.QueryString("Cod")

End If

%>

<%

Dim rsPedido

Dim rsPedido_cmd

Dim rsPedido_numRows

 

Set rsPedido_cmd = Server.CreateObject ("ADODB.Command")

rsPedido_cmd.ActiveConnection = MM_info_STRING

rsPedido_cmd.CommandText = "SELECT t.`Codigo`, (t.`Codigo`) AS CC, t.`NumeroPedido`, t.`DataPedido`, t.`HoraPedido`, t.`IpPedido`, t.`status`, c.`Nome`, c.`Sobrenome`, c.`CPF`, c.`RG`, c.`DataNascimento`, c.`Sexo`, c.`RazaoSocial`, c.`NomeContato`, c.`CNPJ`, c.`Email`, c.`Senha`, c.`TipoEnd`, c.`CEP`, c.`Endereco`, c.`Numero`, c.`Complemento`, c.`Bairro`, c.`Cidade`, c.`Estado`, c.`Telefone1`, c.`Telefone2`, c.`Referencia`, c.`TipoCliente`, pw.`Quantidade`, pw.`valor`, pw.`ValortTotal`, pw.`peso`, p.`CodBarras`, p.`Descricao`, p.`Codigo`, (t.`ValortTotal`) AS VT FROM tb_pedidosweb t, tb_clientesweb c, tb_pedidossubweb pw, tb_produtos p WHERE t.`Codigo` = ? AND c.`codigo` = t.`Cliente` AND pw.`Pedido`= t.`NumeroPedido` AND p.`Codigo`= pw.`codProduto`"

rsPedido_cmd.Prepared = true

rsPedido_cmd.Parameters.Append rsPedido_cmd.CreateParameter("param1", 5, 1, -1, rsPedido__MMColParam) '

 

Set rsPedido = rsPedido_cmd.Execute

rsPedido_numRows = 0

%>

<%

Dim Repeat1__numRows

Dim Repeat1__index

 

Repeat1__numRows = -1

Repeat1__index = 0

rsPedido_numRows = rsPedido_numRows + Repeat1__numRows

%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Acima de Set rsPedido = rsPedido_cmd.Execute

 

Coloque

Response.Write rsPedido_cmd.CommandText

Response.End

 

Pegue a SQL e manda rodar direto no banco de dados. Veja se vai retornar algum valor. Se não retornar, é pq realmente não existe nenhum registro a ser exibido.

 

Poste o resultado.

Compartilhar este post


Link para o post
Compartilhar em outros sites

olá amigo fiz o q falou e deu o seguinte resultado

 

SELECT t.`Codigo`, (t.`Codigo`) AS CC, t.`NumeroPedido`, t.`DataPedido`, t.`HoraPedido`, t.`IpPedido`, t.`status`, c.`Nome`, c.`Sobrenome`, c.`CPF`, c.`RG`, c.`DataNascimento`, c.`Sexo`, c.`RazaoSocial`, c.`NomeContato`, c.`CNPJ`, c.`Email`, c.`Senha`, c.`TipoEnd`, c.`CEP`, c.`Endereco`, c.`Numero`, c.`Complemento`, c.`Bairro`, c.`Cidade`, c.`Estado`, c.`Telefone1`, c.`Telefone2`, c.`Referencia`, c.`TipoCliente`, pw.`Quantidade`, pw.`valor`, pw.`ValortTotal`, pw.`peso`, p.`CodBarras`, p.`Descricao`, p.`Codigo`, (t.`ValortTotal`) AS VT FROM tb_pedidosweb t, tb_clientesweb c, tb_pedidossubweb pw, tb_produtos p WHERE t.`Codigo` = ? AND c.`codigo` = t.`Cliente` AND pw.`Pedido`= t.`NumeroPedido` AND p.`Codigo`= pw.`codProduto`

 

 

??

 

obrigado

abração

Compartilhar este post


Link para o post
Compartilhar em outros sites

Você executou essa consulta diretamente no banco de dados? Exibiu algum registro?

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.