凉微雨 2021-10-20 11:30 采纳率: 0%
浏览 10

aspSmartUpload 组件上传报错

aspSmartUpload error '800a0009'

下标越界

/RMATS/PSGRMA/photoinsertion.asp, line 12

<%@LANGUAGE="VBSCRIPT"%> 
<%
'On error resume next
Dim mysmartupload
Dim intcount
Dim FILE
intcount=0

Set mysmartupload = Server.CreateObject("aspSmartUpload.SmartUpload")
mysmartupload.allowedfileslist="Jpg,bmp,pdf"
mysmartupload.Maxfilesize=700000
mysmartupload.Upload
'intcount = mysmartupload.save("/car/photos")
For each file In mysmartupload.files
	if not file.ismissing then
	file.saveas("Photos/" & file.fileName)
'if err then
'
'else 
'Response.write("<b>Wrong selection: </b>"&err.description)
'then 
	Response.write("<b><font color=#000066 face=Verdana, Arial, Helvetica, sans-serif size=2>File Name= " & file.fileName & "<BR>")
	Response.write("size= "& file.size & " bytes <BR></b>")
	intcount = intcount + 1
	end if
Next

Response.write("<br>"& mysmartupload.files.count & " files could be upload.<BR>")
Response.write("<b>" & intcount & "   file(s) uploaded<br><br><br></font>")
%>
  • 写回答

1条回答 默认 最新

  • Javajishumi 2023-02-22 16:02
    关注

    这个错误通常表示在代码中尝试访问一个超出范围的数组或集合元素。根据代码中的信息,错误发生在第 12 行,但是无法确定具体的错误原因。建议仔细检查代码,确保数组或集合中的元素数量正确,并且没有超出索引范围。还可以尝试添加适当的错误处理代码,例如使用 try-catch 语句来捕获并处理异常。另外,确保已经正确引用了相关的 COM 组件或类库。

    评论

报告相同问题?

问题事件

  • 创建了问题 10月20日

悬赏问题

  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)