| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4397 人关注过本帖
标题:[求助]如何解决调用 BinaryRead 之后,不能使用一般 Request 集合
只看楼主 加入收藏
witer
Rank: 1
等 级:新手上路
帖 子:165
专家分:0
注 册:2006-2-7
收藏
 问题点数:0 回复次数:15 
[求助]如何解决调用 BinaryRead 之后,不能使用一般 Request 集合

cpysadd.asp

<!--#include virtual="/inc/conn.asp" -->
<!--#include file="upfile.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<%dim strysbh
dim strtpys
dim strsycl
dim strkgxh
dim stryszl
dim strbs
strysbh=request("txtysbh")
strtpys=session("address1")
strsycl=request("txtsycl")
strkgxh=request("txtkgxh")
stryszl=request("txtyszl")
strbs=request("txtbs")
set rs_cpys=server.createObject("adodb.recordset")
sqlstr="select * from cpys"
rs_cpys.open sqlstr,conn,1,3
rs_cpys.addnew
rs_cpys("ysbh")=strysbh
rs_cpys("tpys")=strtpys
rs_cpys("sycl")=strsycl
rs_cpys("kgxh")=strkgxh
rs_cpys("yszl")=stryszl
rs_cpys("bs")=strbs
rs_cpys.update
rs_cpys.close
conn.close
set rs_cpys=nothing
set conn=nothing
response.redirect"/admin/cpys.asp"
%>

</body>
</html>

upfile.asp

<!--#include virtual="/inc/upload_5xsoft.inc" -->


<%
dim upload,file,formName,formPath,iCount
set upload=new upload_5xSoft ''建立上传对象

response.write upload.Version&"<br><br>" ''显示上传类的版本

formPath="pictures/"
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"


iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file.SaveAs Server.mappath(formPath&file.FileName) ''保存文件
session("address1")=formPath&File.FileName
iCount=iCount+1
end if
set file=nothing
next
set upload=nothing
%>

搜索更多相关主题的帖子: BinaryRead Request 
2006-02-07 16:21
rainic
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2367
专家分:0
注 册:2005-8-9
收藏
得分:0 
aaaa=request.form("aaa")
改成
aaaa=upload.form("aaa")

[此贴子已经被作者于2006-2-7 16:25:25编辑过]


2006-02-07 16:25
witer
Rank: 1
等 级:新手上路
帖 子:165
专家分:0
注 册:2006-2-7
收藏
得分:0 

Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象

/admin/modifly/cpysadd.asp,行 16

还是不行啊他会出现以上的问题

2006-02-07 16:33
rainic
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2367
专家分:0
注 册:2005-8-9
收藏
得分:0 
set upload=new upload_5xSoft ''建立上传对象
先写上面的
再用下面的
upload.form

2006-02-07 16:34
witer
Rank: 1
等 级:新手上路
帖 子:165
专家分:0
注 册:2006-2-7
收藏
得分:0 
我是新手不是很清楚你可以说明白一些吗?
2006-02-07 16:36
rainic
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2367
专家分:0
注 册:2005-8-9
收藏
得分:0 

<!--#include virtual="/inc/conn.asp" -->
<!--#include file="upfile.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<%
dim upload,file,formName,formPath,iCount
set upload=new upload_5xSoft ''建立上传对象
dim strysbh
dim strtpys
dim strsycl
dim strkgxh
dim stryszl
dim strbs
strysbh=upload.form("txtysbh")
strtpys=session("address1")
strsycl=upload.form("txtsycl")
strkgxh=upload.form("txtkgxh")
stryszl=upload.form("txtyszl")
strbs=upload.form("txtbs")
set rs_cpys=server.createObject("adodb.recordset")
sqlstr="select * from cpys"
rs_cpys.open sqlstr,conn,1,3
rs_cpys.addnew
rs_cpys("ysbh")=strysbh
rs_cpys("tpys")=strtpys
rs_cpys("sycl")=strsycl
rs_cpys("kgxh")=strkgxh
rs_cpys("yszl")=stryszl
rs_cpys("bs")=strbs
rs_cpys.update
rs_cpys.close
conn.close
set rs_cpys=nothing
set conn=nothing
response.redirect"/admin/cpys.asp"
%>

</body>
</html>

upfile.asp

<!--#include virtual="/inc/upload_5xsoft.inc" -->


<%

response.write upload.Version&"<br><br>" ''显示上传类的版本

formPath="pictures/"
''在目录后加(/)
if right(formPath,1)<>"/" then formPath=formPath&"/"


iCount=0
for each formName in upload.file ''列出所有上传了的文件
set file=upload.file(formName) ''生成一个文件对象
if file.FileSize>0 then ''如果 FileSize > 0 说明有文件数据
file.SaveAs Server.mappath(formPath&file.FileName) ''保存文件
session("address1")=formPath&File.FileName
iCount=iCount+1
end if
set file=nothing
next
set upload=nothing
%>

[此贴子已经被作者于2006-2-7 16:40:50编辑过]


2006-02-07 16:38
witer
Rank: 1
等 级:新手上路
帖 子:165
专家分:0
注 册:2006-2-7
收藏
得分:0 

<!--#include virtual="/inc/conn.asp" -->
<!--#include file="upfile.asp"-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<%
set upload=new upload_5xSoft
dim strysbh
dim strtpys
dim strsycl
dim strkgxh
dim stryszl
dim strbs
strysbh=upload.form("txtysbh")
strtpys=session("address1")
strsycl=upload.form("txtsycl")
strkgxh=upload.form("txtkgxh")
stryszl=upload.form("txtyszl")
strbs=upload.form("txtbs")
set rs_cpys=server.createObject("adodb.recordset")
sqlstr="select * from cpys"
rs_cpys.open sqlstr,conn,1,3
rs_cpys.addnew
rs_cpys("ysbh")=strysbh
rs_cpys("tpys")=strtpys
rs_cpys("sycl")=strsycl
rs_cpys("kgxh")=strkgxh
rs_cpys("yszl")=stryszl
rs_cpys("bs")=strbs
rs_cpys.update
rs_cpys.close
conn.close
set rs_cpys=nothing
set conn=nothing
response.redirect"/admin/cpys.asp"
set upload=nothing
%>

</body>
</html>
我已经改成这样啦可以运行但是会出错没效果出现

2006-02-07 16:41
rainic
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:2367
专家分:0
注 册:2005-8-9
收藏
得分:0 
我刚才看错,以为是第六行,原来是很十六行,现在好了,代码在上面

2006-02-07 16:44
witer
Rank: 1
等 级:新手上路
帖 子:165
专家分:0
注 册:2006-2-7
收藏
得分:0 
你的代码我试过啦还是走不了啊

2006-02-07 16:47
witer
Rank: 1
等 级:新手上路
帖 子:165
专家分:0
注 册:2006-2-7
收藏
得分:0 
那我应该怎解决啊可以帮我写出错误的地方吗?
2006-02-07 16:50
快速回复:[求助]如何解决调用 BinaryRead 之后,不能使用一般 Request 集合
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016992 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved