香菜难道你迷路了吗:Microsoft VBScript 运行时错误 错误 '800a000d'

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/03 01:12:39
Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: '[string: ""]'

/xx1.asp,行 21

源码:

<!--#include file=conn.asp-->
<!--#include file=inc/inc.asp-->
<%
rsname=ReplaceBadChar(Trim(Request("name")))
fadd=Cstr(Request.ServerVariables("HTTP_REFERER"))
if fadd="" then
fadd="未知数据"
end if
ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if ip<> "" then
response.Redirect ""&xxurl&"?action=go2&username="&rsname&""
end if
If ip = "" Then
ip = Request.ServerVariables("REMOTE_ADDR")
end if
set rs2=server.CreateObject("adodb.recordset")
if SystemDatabaseType="Sql" then
PostTime_sql="datediff(dd,fdata,getdate())<"&date()&" AND"
sql="select * from [ip] where "&posttime_sql&" fip='"&ip&"' and username='"&rsname&"'"
elseif SystemDatabaseType="Access" then
sql="select * from [ip] where fdata>=#"&dateadd("d",""&OkIp&"",date)&"# and fip='"&ip&"' and username='"&rsname&"'"
end if
rs2.open sql,conn,1,3
if rs2.eof then
response.Redirect ""&xxurl&"?action=go2&username="&rsname&""
else
response.Redirect ""&weburl&""
end if
%>

请问这到底出了什么问题啊?
问题我怀疑解决了。。我怀疑是数据库里没有OKIP这个键

dateadd("d",Int(OkIp),date)