说明:参数也传递过来了,运行时也没有错误,但是为什么数据写不到库里去呢?!
<%
set myrequest=new uploadclass
myrequest.maxsize=1024*1024*4
myrequest.filetype="jpg/gif/rar/zip/"
myrequest.savepath="upload_pro/"
myrequest.open
%>
<%
dim id,pname,pdes,pbasic,pface,ptech,pxn,pgn,pic,perr
id=trim(myrequest.form("id"))
pname=trim(myrequest.form("name"))
pdes=trim(myrequest.form("des"))
pbasic=trim(myrequest.form("basic"))
pface=trim(myrequest.form("face"))
ptech=trim(myrequest.form("tech"))
pxn=trim(myrequest.form("xn"))
pgn=trim(myrequest.form("gn"))
pic=myrequest.savepath&myrequest.form("pic")
perr=myrequest.form("pic_err")
%>
<%
select case perr
case -1:
response.write "<font style='font-size:12px; font-family:宋体; color:red'>没有文件上传</font>"
case 1:
response.write "<font style='font-size:12px; font-family:宋体; color:red'>文件超出了设定的上限</font>"
case 2:
response.write "<font style='font-size:12px; font-family:宋体; color:red'>只能上传jpg/gif/rar/zip格式的文件!!</font>"
case 3:
response.write "<font style='font-size:12px; font-family:宋体; color:red'>文件超出恶劣设定的上限并且文件格式不正确(jpg/gif/rar/zip),</font>"
case 0:
response.write "<font style='font-size:12px; font-family:宋体; color:red'>文件上传成功----》</font>"
response.write "<font style='font-size:12px; font-family:宋体; color:red; cursor:hand'><br><a target='_blank' href='"&myrequest.savepath&myrequest.form("pic")&"'>查看上传的图片</a></font>"
response.write "<font style='font-size:12px; font-family:宋体; color:red; cursor:hand'><br><a target='_blank' href='upload_ps.asp?id="&id&"'>继续上传</a></font>"
on error resume next
set rs=server.createobject("adodb.recordset")
rs.open "select * from product where id="&cint(id),cn,1,3
rs.addnew
rs("pname")=pname
rs("pdes")=pdes
rs("pbasic")=pbasic
rs("pface")=pface
rs("ptech")=ptech
rs("pxn")=pxn
rs("pgn")=pgn
rs("pic")=pic
rs("id")=cint(id)
rs.update()
end select
%>