Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADODB.Field error '800a0bcd'

Tags:

asp-classic

I'm getting an error in my .asp file, and I don't know how to solve this (I don't know ASP, it's an old project of my client, other developer did this). The error what i'm getting is the following:

    ADODB.Field error '800a0bcd'

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

    /br/grava_cadastro.asp, line 105

And the lines:

 100 %>
 101   <!--#include file="abrir_arquivo.asp"-->  
 102 <%
 103 xip= Request.ServerVariables("REMOTE_ADDR")
 104 RS.Open "SELECT * from  visitas where vi_data = date() and vi_ip='" &  xip & "'",cn,3,3
 105 xlink=rs("vi_link")
 106 rs.close

It's blocking my signup form. Somebody know how to solve this? Thanks in advance!

like image 504
Thiago Avatar asked Nov 30 '12 15:11

Thiago


2 Answers

Are you sure that you have records?

in line 105 you are asumming that the is a record, what if not?

why don't you add something like this:

   if rs.eof = false then
       xlink=rs("vi_link")
   end if

also,

in the sql line you have this:

RS.Open "SELECT * from  visitas where vi_data = date() and vi_ip='" &  xip & "'",cn,3,3

but I am not sure if date() should go like that, it should have '"& date() &"' or "& date() &" (not remember if date is considered string or numeric)

it should be like this:

RS.Open "SELECT * from  visitas where vi_data = '" & date() & "' and vi_ip='" &  xip & "'",cn,3,3
like image 101
Alvaro Hernandorena Avatar answered Nov 07 '22 22:11

Alvaro Hernandorena


We received this error on a legacy Classic ASP application. It turned out a value they were copying from another system into the submission form was adding non-visible characters to the input field.

like image 34
gregsonian Avatar answered Nov 07 '22 23:11

gregsonian