473,395 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Jul 19 '05 #1
3 13193
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" <rb*****@usc.edu> wrote in message
news:f1**************************@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

Jul 19 '05 #2
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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
Throw in some response.writes and watch the keys.

Ray at home

"Rahul Bakshi" <rb*****@usc.edu> wrote in message
news:%2****************@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 http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: | last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k IE6 but with different effect. On the first computer I get several line of HTML outputed by ASP, shown correctly by...
3
by: Mike Kanski | last post by:
I get this error Microsoft VBScript runtime error '800a01fb' When i call LoadPicture method, or when i pretty much do any operation with PictureBox like setting width and height. It happened...
10
by: Seeker | last post by:
Hi! I have to do some developing and I'm trying to configure my server to mimic the operation of our production server. The issue I'm having is that I'm trying to use CDONTS to send an email...
1
by: PaulieS | last post by:
Hi all. Am migrating a customer from IIS5 on W2K server to IIS6 on W2K3. Zipped all the websites and unzipped them to the identical locations on new server. Used IISMT to migrate metabase. ...
3
by: Snow | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' The error happened at this line: if session("systemIdCount" & arrSystems(iLoop)) 0 The code like this:
2
by: anidmarty | last post by:
Hey I'm a Sysadmin and my users are getting this error on my production box. It works fine on the dev box. There is a script that is run that generates this error. Production is clustered...
0
by: =?Utf-8?B?TWF0dCBDYWxob29u?= | last post by:
HI there, I am getting an error on my page which calls up a web service. Microsoft VBScript runtime error '800a13ba' Unknown runtime error: 'SearchQueryXML' /SearchResults.asp, line 142
1
by: monika | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' /OnlineLIB/BNosearch1.asp, line 32 The error happened at this line:bookno = chr(bookno) The code like...
4
by: Genken | last post by:
Hi can anybody help me i get this error when running this code. Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' And then a line number indicating where the error is, i...
0
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.