Index out of range .. upload script

Discussion in 'ASP General' started by Arben Kryeziu, Jul 15, 2003.

  1. I am getting following error:

    Persits.Upload.1 error '800a009'

    Index out of range.
    /rtdAddItemSave.asp line 27


    >> Line 27 would be the one I marked ## <<


    <%
    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
    %>
     
    Arben Kryeziu, Jul 15, 2003
    #1
    1. Advertising

  2. Arben Kryeziu

    Ray at Guest

    Which line is line 27?

    Ray at home

    "Arben Kryeziu" <> wrote in message
    news:BB3999B1.362C%...
    > I am getting following error:
    >
    > Persits.Upload.1 error '800a009'
    >
    > Index out of range.
    > /rtdAddItemSave.asp line 27
    >
    >
    > >> Line 27 would be the one I marked ## <<

    >
    > <%
    > Set upl = Server.CreateObject("Per


    [trim]
     
    Ray at, Jul 16, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yyt

    Index was out of range?

    yyt, Dec 18, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    488
    Hans Kesting
    Dec 19, 2003
  2. Clark Choi
    Replies:
    1
    Views:
    4,535
    Alvin Bruney
    Jan 10, 2004
  3. DaveF

    Insertion index was out of range.

    DaveF, May 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,536
    Alvin Bruney [MVP]
    May 30, 2004
  4. hari
    Replies:
    3
    Views:
    12,590
    Vimal
    Nov 15, 2006
  5. Tomasz Chmielewski

    sorting index-15, index-9, index-110 "the human way"?

    Tomasz Chmielewski, Mar 4, 2008, in forum: Perl Misc
    Replies:
    4
    Views:
    323
    Tomasz Chmielewski
    Mar 4, 2008
Loading...

Share This Page