永发信息网

ADODB.Recordset 错误 '800a0bb9'

答案:1  悬赏:50  手机版
解决时间 2021-07-29 03:46

ADODB.Recordset 错误 '800a0bb9'

参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。

/admin1/picnews/a_addpicok.asp,行 88
代码如下


<!--#include FILE="clsUp.asp"-->
<%

sql0="DBQ="+server.mappath("../../1/db2.mdb")+";DRIVER={Microsoft Access Driver (*.mdb)};"
set conn0=server.createobject("ADODB.CONNECTION")
conn0.open sql0

dim upfile,formPath,ServerPath,FSPath,formName,FileName,oFile,upfilecount,GetFilePath,file1,id,rst,sqlt,rec,dd,strsql,connstr,conn
upfilecount=0
set upfile=new clsUp
upfile.NoAllowExt="asp;exe;htm;html;aspx;cs;vb;js;"
upfile.GetData (10240000)

for each formName in upfile.file
set oFile=upfile.file(formname)
if upfile.form("title")="" then
Response.Write "<script language=javascript>alert('没有标题');history.back(-1);</script>"
response.end
end if
if oFile.filesize=0 then
Response.Write "<script language=javascript>alert('没有缩位图');history.back(-1);</script>"
response.end
end if
FileName=month(now)&day(now)&hour(now)&minute(now)&second(now)&oFile.filename
FSPath=Server.mappath("pic/")
upfile.SaveToFile formname,FSPath&"\"&FileName

response.write FSPath&"\"&FileName
if upfile.isErr then
select case upfile.isErr
case 1
Response.Write "<script language=javascript>alert('"&upfile.errmessage&"');history.back(-1);</script>"
response.end
case 2
Response.Write "<script language=javascript>alert('"&upfile.errmessage&"');history.back(-1);</script>"
response.end
case 3
Response.Write "<script language=javascript>alert('"&upfile.errmessage&"');history.back(-1);</script>"
response.end
end select
else




connstr = "Driver={SQL Server};server=(local);uid=baby;pwd=qingdao!##)^#(@)(^baby;database=baby;"
set conn = Server.Createobject("ADODB.Connection")
conn.open connstr

id=session("id")
set rst=server.createobject("adodb.recordset")
sqlt="select * from qyml where id='"&session("id")&"'"
rst.open sqlt,conn,1,3
set rec=server.createobject("ADODB.recordset")
rec.Open "SELECt * FROM picnews",conn,1,3
rec.addnew
rec("class")=upfile.form("class")
rec("fl")=upfile.form("fl")
rec("content")=upfile.form("content")
rec("title")=upfile.form("title")
rec("id")=session("id")
rec("kidname")=rst("qymc")
rec("qu")=rst("sf")
rec("dat")=now()
rec("flag")=0
rec("pic")=FileName
rec("filePathName")="../htmlp/"&month(now)&day(now)&hour(now)&minute(now)&second(now)&year(now)&".html"

rec.update

dim nn
dd="select count(kidid) from picnews where id="&session("id")
set nn=conn.execute(dd)
nn=nn(0)
strSQL="update qyml set uflag="&nn&"where [id]="&session("id")
conn.Execute strSQL
set nn=nothing

set ofile=nothing
end if
next



set rs1=server.CreateObject("ADODB.RecordSet")
rs1.open "select top 1 * from picnews order by kidid desc",conn,1,1(这个就是88行)

if rs1("class")="0" then
zfrom="幼儿园"
else
zfrom=rs1("class")
end if

set rsModel=server.createObject("Adodb.RecordSet")
sqlModel="select * from news_Model where id=231"
rsModel.open sqlModel,conn0,1,1

page_Model=rsModel("ModelContent")
page_Model = Replace(page_Model, "$#$###TopTitle###$#$", upfile.form("title")&" | 青岛学前教育网 | 青岛幼教网")
page_Model = Replace(page_Model, "$#$###Title###$#$", upfile.form("title"))
page_Model = Replace(page_Model, "$#$###type###$#$", rst("qymc"))
page_Model = Replace(page_Model, "$#$###DateTime###$#$",now())
page_Model = Replace(page_Model, "$#$###laiyuan###$#$",rst("qymc"))
page_Model = Replace(page_Model, "$#$###web###$#$",rst("web"))
page_Model = Replace(page_Model, "$#$###zfrom###$#$",zfrom)
page_Model = Replace(page_Model, "$#$###Content###$#$",upfile.form("content"))
page_Model = Replace(page_Model, "$#$###id###$#$",rs1("kidid"))


Set fs = Server.CreateObject("Scripting.FileSystemObject")

fpn=rs1("filePathName")
Filepn = Server.MapPath("../"&fpn)
Set txt = fs.OpenTextFile(Filepn, 2, True) '打开为只写文件
Data=page_Model
txt.write Data
txt.close
set txt=nothing
set fs=nothing

if rsModel.state<>0 then rsModel.close
set rsModel=nothing

conn.close
set conn=nothing

if err.number=0 then
%>
<script language="vbscript" >
msgbox "静态页成功生成!",64
</script>
<%
else
response.Write err.description

%>
<script language="vbscript" >
msgbox "数据入库过程中出现意外,操作失败。",64
</script>
<%

end if

response.redirect "p_list.asp"

%>

最佳答案

set rs1=server.CreateObject("ADODB.RecordSet")
sql="select top 1 * from picnews order by kidid desc"
rs1.open sql,conn,1,1(这个就是88行)



set rs1=server.CreateObject("ADODB.RecordSet")
sql="select top 1 * from picnews order by kidid desc"
rs1.open sql,conn0,1,1(这个就是88行)


看一下可以吗

我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
“东风不与周郎便,铜雀春深锁二乔”的前两句
60年国庆阅兵有多少个方队
一天,小明注意到家中的灯泡比平常亮,猜测可
You are not authorised to view this resour
现在的QQ空间怎么查最近访客
淇滨区鹤壁青马物流(金辉)怎么去啊,谁知道地
无解的爱该怎么继续?
目前什么杀毒软件最好?
怎么戒掉洁癖
梦幻诛仙点技能要花多少的钱?
要怎么向一个女孩表白?(有新意,但不要夸张
上课发呆怎么办呢?
安徽文科体育特长生上合肥师范学院需多少分
家用墙壁插座的功率?建议最大使用多少功率?使
武冈市曼天雨(邵阳分公司武冈店)怎么去啊,谁
推荐资讯
“老雁警戒的看着前面。”中“警戒”的意思
我想杭州去温州
一个人掉进河里,为什么头发没有湿呢
讷河市齐齐哈尔华世博纪KTV练歌广场地址在哪
荷塘区株洲泉辉农家乐地址在什么地方,想今天
向量a膜等于向量b膜等于向量a加b膜 求向量a与
竹山县十堰千福体彩(千福路)在什么地方啊,我
我把腾讯TT设为默认的浏览器了,怎么一打开图
分子是不断运动的。这句话对吗????
为什么我的农场天天有偷菜的
穿越上不去到底为什么
开情侣空间有用吗
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?