SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Kuala Lumpur
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Urgent!!Upload Error

    Hi All,
    Can anyone help me on the problem below???

    Error Type:
    aspSmartUpload (0x800A01C9)
    This key is already associated with an element of this collection

    This is the error message.

    My code is a s below, i simply it
    if Request.QueryString("action")= "update" then 'page called to add new item
    'to update
    Set MyPageUpload = Server.CreateObject("AspSmartUpLoad.SmartUpLoad")

    MyPageUpload.Upload

    'info for product
    ProductID = MyPageUpload.Form.Item("ProductID")
    else Request.QueryString("action")= "change"
    Set MyPageUpload2 = Server.CreateObject("AspSmartUpLoad.SmartUpLoad")

    MyPageUpload2.Upload

    'info for product
    ProductID = MyPageUpload2.Form.Item("ProductID")
    end if

    at first, i declare both with the same MyPageUpload, after i discover theis error, i use diff var, but still hav the same error....
    can anyone help me on this...

    thanks for the help.

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've used that object and have never come across this error.

    Why are you creating 2 SmartUpload objects on the same page? I don't think you need to. That could be causing the error.

    What are you trying to do?

  3. #3
    SitePoint Member
    Join Date
    Apr 2003
    Location
    Kuala Lumpur
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    at first, i am using the same name as well, n it get that error, so, after that i chnage the var to 2, it still hav the error, i just want to upload the file.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •