Microsoft VBScript runtime error '800a01c9'

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Microsoft VBScript runtime error '800a01c9'

    Hi

    I am getting this error which is frustrating me a lot

    Microsoft VBScript runtime error '800a01c9'

    This key is already associated with an element of this collection

    /process.asp, line 362

    the following is the code snippet:



    Sub AddItemToCart(iItemID, iItemCount)
    aParameters = GetItemParameters(iItemID)

    If dictCart.Exists(iItemID) Then

    If CInt(aParameters(6)) > CInt(dictCart(iItemID)) then
    dictCart(iItemID) = dictCart(iItemID) + iItemCount
    Response.Write "<font face=Verdana color=#c8c8c8 size=2>" &
    iItemCount & " of item # " & iItemID & " have been added to your
    cart.<BR><BR></font>" & vbCrLf
    Else
    Response.Write "<font face=Verdana color=#c8c8c8 size=2>" & "There
    is no more stock available to add<BR><BR></font>" & vbCrLf
    End If

    Else
    If CInt(aParameters(6)) > CInt(dictCart(iItemID)) then
    dictCart.Add iItemID, iItemCount >>>>>>>> line 362 <<<<<<<<<<<<<
    Response.Write "<font face=Verdana color=#c8c8c8 size=2>" &
    iItemCount & " of item # " & iItemID & " have been added to your
    cart.<BR><BR></font>" & vbCrLf
    Else
    Response.Write "<font face=Verdana color=#c8c8c8 size=2>" & "There
    is no more stock available to add<BR><BR></font>" & vbCrLf
    End If

    End If

    End Sub


    Please suggest me if you can find some error



    regards

    Rahul
    Rahul Bakshi Guest

  2. Similar Questions and Discussions

    1. Microsoft VBScript runtime error '800a01ad'
      I get the following error message when trying to create an instance of a DLL on a Windows 2003 Server machine from an ASP page: Microsoft VBScript...
    2. Error : Microsoft VBScript runtime (0x800A000D)
      Hi, I get an error Type mismatch: 'LBound' when I try to submit my form, which saves the form data to database. There is not much of a help...
    3. Microsoft VBScript runtime error '800a000d' ??
      can someone help me out i keep getting this error ? Microsoft VBScript runtime error '800a000d' Type mismatch: 'IsBlank' /dating/admin.asp,...
    4. Microsoft VBScript runtime error '800a01fb'
      Hello All, I started getting the following error for some unknow reason and can not figure out why. Here are the errors I am getting: An...
    5. Microsoft VBScript runtime error '800a0046'
      hello all, i have a permission issue. my script works fine on my windows2000 server development box, however when i move it to my windows2003...
  3. #2

    Default Re: Microsoft VBScript runtime error '800a01c9'

    That means that you're trying to add something into your dictionary object
    with the same key as another item that already exists. For example:

    This will cause that error:
    objYourDictionaryObject.Add "key1", "Bird"
    objYourDictionaryObject.Add "key1", "Cat"

    This will not cause an error:
    objYourDictionaryObject.Add "key1", "Bird"
    objYourDictionaryObject.Add "key2", "Cat"

    See how the keys are different? They must be.

    "Rahul Bakshi" <rbakshi@usc.edu> wrote in message
    news:f17101a7.0309272045.330b2518@posting.google.c om...
    > Hi
    >
    > I am getting this error which is frustrating me a lot
    >
    > Microsoft VBScript runtime error '800a01c9'
    >
    > This key is already associated with an element of this collection
    >
    > /process.asp, line 362
    >
    > the following is the code snippet:
    >
    >
    >
    > Sub AddItemToCart(iItemID, iItemCount)
    > aParameters = GetItemParameters(iItemID)
    >
    > If dictCart.Exists(iItemID) Then
    >
    > If CInt(aParameters(6)) > CInt(dictCart(iItemID)) then
    > dictCart(iItemID) = dictCart(iItemID) + iItemCount
    > Response.Write "<font face=Verdana color=#c8c8c8 size=2>" &
    > iItemCount & " of item # " & iItemID & " have been added to your
    > cart.<BR><BR></font>" & vbCrLf
    > Else
    > Response.Write "<font face=Verdana color=#c8c8c8 size=2>" & "There
    > is no more stock available to add<BR><BR></font>" & vbCrLf
    > End If
    >
    > Else
    > If CInt(aParameters(6)) > CInt(dictCart(iItemID)) then
    > dictCart.Add iItemID, iItemCount >>>>>>>> line 362 <<<<<<<<<<<<<
    > Response.Write "<font face=Verdana color=#c8c8c8 size=2>" &
    > iItemCount & " of item # " & iItemID & " have been added to your
    > cart.<BR><BR></font>" & vbCrLf
    > Else
    > Response.Write "<font face=Verdana color=#c8c8c8 size=2>" & "There
    > is no more stock available to add<BR><BR></font>" & vbCrLf
    > End If
    >
    > End If
    >
    > End Sub
    >
    >
    > Please suggest me if you can find some error
    >
    >
    >
    > regards
    >
    > Rahul

    Ray at Guest

  4. #3

    Default Re: Microsoft VBScript runtime error '800a01c9'

    Hi

    I know the cause of the error

    However i do not understand how the dictionary already has those keys
    as this is the first item I am trying to add.

    thanks for the quick response

    regards
    Rahul

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Rahul Bakshi Guest

  5. #4

    Default Re: Microsoft VBScript runtime error '800a01c9'

    Throw in some response.writes and watch the keys.

    Ray at home

    "Rahul Bakshi" <rbakshi@usc.edu> wrote in message
    news:%23pXsdHYhDHA.1272@TK2MSFTNGP09.phx.gbl...
    > Hi
    >
    > I know the cause of the error
    >
    > However i do not understand how the dictionary already has those keys
    > as this is the first item I am trying to add.
    >
    > thanks for the quick response
    >
    > regards
    > Rahul
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Ray at Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139