A
Arben Kryeziu
I am getting following error:
Persits.Upload.1 error '800a009'
Index out of range.
/rtdAddItemSave.asp line 27
<%
Set upl = Server.CreateObject("Persits.Upload")
upl.OverwriteFiles = False
upl.Save application("essilorRtdSAfileUpPath")
loopNumber=1
for each item in upl.form
'##### gather the non-file form parameters
select case loopNumber
case 1
'##### get the projectID
##if len(upl.form(item))>0 then##
projectID=upl.form(item)
if NOT isnumeric(projectID) then
displayErrorPage("Project ID is not numeric.")
Response.end
end if
else
displayErrorPage("Project ID not provided.")
Response.end
end if
case 2
'##### get the reqmtID
if len(upl.form(item))>0 then
reqmtID=upl.form(item)
if NOT isnumeric(reqmtID) then
displayErrorPage("Requirement ID is not
numeric.")
Response.end
end if
else
displayErrorPage("Requirement ID not provided.")
Response.end
end if
case 3
'##### get the itemType
if len(upl.form(item))>0 then
itemType=filterInput(upl.form(item))
else
displayErrorPage("Please provide an item type.")
Response.end
end if
case 4
'##### get the itemDescription
if len(upl.form(item))>0 then
itemDescription=filterInput(upl.form(item))
else
displayErrorPage("Please provide an item
description.")
Response.end
end if
case 5
'##### get the itemValue
if len(upl.form(item))>0 then
itemValue=filterInput(upl.form(item))
end if
case 6
if len(upl.form(item))>0 then
if upl.form(item).isEmpty then
donothingage=true
else
filename1 =
mid(upl.Form(item).userfilename,instrrev(upl.Form(item).userfilename,"\")+1)
end if
end if
end select
'##### Save the user's file to the server
if IsObject(upl.form(item)) then
if upl.form(item).isEmpty then
donothingage=true
else
on error resume next
NewFileName = Mid(upl.Form(item).UserFilename,
InstrRev(upl.Form(item).UserFilename, "\") + 1)
upl.Form(item).SaveAs Newfilename
'upl.save
if err<>0 then
displayErrorPage("Error uploading file to server.")
Response.end
end if
on error goto 0
end if
end if
loopNumber = loopNumber + 1
next
set upl = nothing
%>
Persits.Upload.1 error '800a009'
Index out of range.
/rtdAddItemSave.asp line 27
<%
Set upl = Server.CreateObject("Persits.Upload")
upl.OverwriteFiles = False
upl.Save application("essilorRtdSAfileUpPath")
loopNumber=1
for each item in upl.form
'##### gather the non-file form parameters
select case loopNumber
case 1
'##### get the projectID
##if len(upl.form(item))>0 then##
projectID=upl.form(item)
if NOT isnumeric(projectID) then
displayErrorPage("Project ID is not numeric.")
Response.end
end if
else
displayErrorPage("Project ID not provided.")
Response.end
end if
case 2
'##### get the reqmtID
if len(upl.form(item))>0 then
reqmtID=upl.form(item)
if NOT isnumeric(reqmtID) then
displayErrorPage("Requirement ID is not
numeric.")
Response.end
end if
else
displayErrorPage("Requirement ID not provided.")
Response.end
end if
case 3
'##### get the itemType
if len(upl.form(item))>0 then
itemType=filterInput(upl.form(item))
else
displayErrorPage("Please provide an item type.")
Response.end
end if
case 4
'##### get the itemDescription
if len(upl.form(item))>0 then
itemDescription=filterInput(upl.form(item))
else
displayErrorPage("Please provide an item
description.")
Response.end
end if
case 5
'##### get the itemValue
if len(upl.form(item))>0 then
itemValue=filterInput(upl.form(item))
end if
case 6
if len(upl.form(item))>0 then
if upl.form(item).isEmpty then
donothingage=true
else
filename1 =
mid(upl.Form(item).userfilename,instrrev(upl.Form(item).userfilename,"\")+1)
end if
end if
end select
'##### Save the user's file to the server
if IsObject(upl.form(item)) then
if upl.form(item).isEmpty then
donothingage=true
else
on error resume next
NewFileName = Mid(upl.Form(item).UserFilename,
InstrRev(upl.Form(item).UserFilename, "\") + 1)
upl.Form(item).SaveAs Newfilename
'upl.save
if err<>0 then
displayErrorPage("Error uploading file to server.")
Response.end
end if
on error goto 0
end if
end if
loopNumber = loopNumber + 1
next
set upl = nothing
%>