请教,我在做一个图片和文字同时上传的程序时(具体为点击修改,把库里的内容显示在页面上,在这个页面上修改后,提交到库里,),提示错误类型:
Request 对象, ASP 0208 (0x80004005)
调用 BinaryRead 之后,不能使用一般 Request 集合。
/hellohello/tianqiyubao/tianqixiugai1.asp, 第 28 行
这是我的主要代码
<!--#include file="upload_5xsoft.inc"-->
<%
dim uploadobj,fileobj,filename
set uploadobj=new upload_5xSoft
set fileobj=uploadobj.file("mefile")
filename=fileobj.FileName
ff=server.mappath("images")+"\"+filename
if fileobj.FileSize>0 then
fileobj.SaveAs(ff)
end if
set conn=server.createobject("adodb.connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("123.mdb")
conn.open connstr
set rst=server.createobject("adodb.recordset")
rst.open "select * from tianqi",conn,1,1
-------------------------------------------------------------------------------------
这段代码是从上一个页面传过来的值,显示在本页面上
id=request("id1")
mingcheng=request("mingcheng1")
up=request("up1")
down=request("down1")
zi=request("zi1")
tianqiz=request("tianqiz1")
power=request("power1")
-----------------------------------------------------------------------
修改后提交到库里的值
mingcheng2=uploadobj.form("mingcheng")
up2=uploadobj.form("up")
down2=uploadobj.form("down")
zi2=uploadobj.form("zi")
tianqiz2=uploadobj.form("tianqiz")
power2=uploadobj.form("power")
if request.QueryString("Submit")="提交" then
strsql="update tianqi set cityname='"&mingcheng2&"',gaowen='"&up2&"',img='images/"+filename+"',diwen='"&down2&"',ziwaixian='"&zi2&"',weather='"&tianqiz2&"',fengli='"&power2&"'where IDID="&cint(id)
conn.execute strsql
end if
%>
<body>
<form action="tianqixiugai1.asp" method="post" enctype="multipart/form-data" name="form1">
<table width="404" border="1">
<tr>
<td width="137"><div align="right">城市名称:</div></td>
<td width="251"><input name="mingcheng1" type="text" size="12" value="<%=mingcheng%>"></td>
</tr>---------------------------------------------------这是显示的内容
<tr>