错误类型: ADODB.Recordset (0x800A0BB9) 参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突

<%@Language=VBScriptcodepage=65001%><!--#includeFile="adovbs.inc"--><!--#includeFile=... <%@ Language=VBScript codepage=65001%>
<!--#include File="adovbs.inc"-->
<!--#include File="inc_funcs.asp"-->
<!--#include File="inc_c_database.asp"-->
<%
dim Connect, rs
set Connect = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
%>
<%
dim mail_id, vrfy, email
vrfy=Request.QueryString("vrfy")
email=Request.QueryString("email")
mail_id = Trim( Request.QueryString( "mail_id" ) )

'防止标识超过长度限制
if Len(mail_id)>20 then
mail_id = Left( mail_id, 20 )
end if

dim f,fp
%>
<!--#include File="inc_conn.inc"-->
<%
Dim selstr

if vrfy<>"" then
if Err.number <> 0 then
Response.Write "Vrfy Failed"&chr(13)&chr(10)
Response.Write Err.Description
else
Response.Write "Vrfy OK"
end if
Response.End
end if

if mail_id<>"" and len(mail_id)>0 and Instr( email, "@" )>1 then
'读取黑白名单设置
dim badd
badd = get_isadd( mail_id )

if Err.number<>0 then
Response.Write Err.Description
end if

' 需要添加记录
if badd then
' 使用 Command , 参数 SQL
dim cmd, p1
set cmd = Server.CreateObject("ADODB.Command")
cmd.CommandText = "SELECT * FROM [stat] WHERE mail_id=?;"
Set p1 = cmd.CreateParameter ("@P1", adVarChar, 1, 20, mail_id )
cmd.Parameters.Append p1
rs.Open cmd, adOpenKeyset, adLockOptimistic

'添加统计记录
if rs.RecordCount>0 then
rs("mail_read") = rs("mail_read")+1
rs.Update
else
rs.AddNew
rs("mail_id")=mail_id
rs("mail_read")=1
rs.Update
end if

dim id
id = rs("id")

'添加详细记录
rs.Close
rs.Open "select top 1 * from list", Connect, adOpenKeyset, adLockOptimistic
rs.AddNew()
rs("mailid")= id
rs("ip") = Request.ServerVariables("REMOTE_ADDR")
rs("client")= Request.ServerVariables("HTTP_USER_AGENT")
rs("email") = email
rs("date") = Now()
rs.Update

rs.Close
end if
end if
Connect.Close
%>
<%
dim st
set st = Server.CreateObject("ADODB.Stream")

Response.ContentType = "image/gif"

Response.Buffer = true

st.Open
st.Type = 1
st.LoadFromFile( Server.MapPath("blank.gif") )
Response.BinaryWrite st.Read
st.Close

Response.Flush
%>
展开
 我来答
aqaqn16
2011-02-19 · TA获得超过289个赞
知道答主
回答量:218
采纳率:0%
帮助的人:0
展开全部
connection/conn.asp
文件里没有定义server.CreateObject("ADODB.Connection")
应该是:
var MM_conn_STRING
set MM_conn_STRING = server.CreateObject("ADODB.Connection")
MM_conn_STRING.open "Driver=;dbq=" & Server.MapPath("/data/Db.mdb")
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式