一个关于删除附件的问题,急!

zhaozipeng 2004-05-09 03:35:20
我删除附件文件的代码如下:
id=request(trim("id"))
sql2="select * from zg_f_date where f_id='"&id&"' "
set rs1=convulcan.execute(sql2)
if not rs1.eof then
f_fujian=rs1("f_fujian")
sortid=rs1("sortid")
filename=rs1("filename")
rs1.close
set rs1=nothing
set rs=server.createobject("adodb.recordset")
sql="delete from zg_f_date where f_id='"&id&"'"
rs.open sql,convulcan,1,1
'rs.close
'set rs=nothing
if f_fujian=1 then
addr="../"&sortid&"/"&filename
FiLePaTh1 =Server.MapPath(addr)
Set fso1 = CreateObject("Scripting.FileSystemObject")
fso1.DeleteFile(filepath1)
Set fso1 = nothing
end if

end if
产生如下错误
Microsoft VBScript 运行时错误 错误 '800a01ad'

ActiveX 部件不能创建对象: 'Scripting.FileSystemObject'

/exhibition/admin/dele.asp,行24
...全文
31 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
gdmm 2004-05-09
  • 打赏
  • 举报
回复
convulcan???
arcow 2004-05-09
  • 打赏
  • 举报
回复
改成Set fso1 = server.CreateObject("Scripting.FileSystemObject")不行就是服务器禁用了fso
qiao198 2004-05-09
  • 打赏
  • 举报
回复
不支持或没有权限
tangxufeng 2004-05-09
  • 打赏
  • 举报
回复
把Set fso1 = CreateObject("Scripting.FileSystemObject")
改成Set fso1 = server.CreateObject("Scripting.FileSystemObject")

zhaozipeng 2004-05-09
  • 打赏
  • 举报
回复
帮我啊
zhaozipeng 2004-05-09
  • 打赏
  • 举报
回复
那如何解决呢,高手帮忙啊!
ttt2 2004-05-09
  • 打赏
  • 举报
回复
服务器不支持这个组件
skyboy0720 2004-05-09
  • 打赏
  • 举报
回复
Set fso1 = Server.CreateObject("Scripting.FileSystemObject")

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧