ADODB.Field 错误“800a0bcd" [英] ADODB.Field error '800a0bcd'
问题描述
我的 .asp 文件出现错误,我不知道如何解决(我不懂 ASP,这是我客户的旧项目,其他开发人员这样做了).我得到的错误如下:
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
还有台词:
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!
推荐答案
你确定你有记录吗?
在 line 105
中,您假设 是一条记录,如果不是呢?
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
还有,
在 sql 行中你有这个:
in the sql line you have this:
RS.Open "SELECT * from visitas where vi_data = date() and vi_ip='" & xip & "'",cn,3,3
但我不确定 date()
是否应该这样,它应该有 '"& date() &"' 或 "& date() &"
(不记得日期是字符串还是数字)
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)
应该是这样的:
RS.Open "SELECT * from visitas where vi_data = '" & date() & "' and vi_ip='" & xip & "'",cn,3,3
这篇关于ADODB.Field 错误“800a0bcd"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!