Microsoft Vbscript Runtime Error 800a01c9
Question Need help? Post your question and get tips & solutions from a community of 418,590 IT Pros & Developers. It's quick & easy. Microsoft VBScript runtime error '800a01c9' P: n/a Rahul Bakshi 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 "" & iItemCount & " of item # " & iItemID & " have been added to your cart.
" & vbCrLf Else Response.Write "" & "There is no more stock available to add
" & vbCrLf End If Else If CInt(aParameters(6)) > CInt(dictCart(iItemID)) then dictCart.Add iItemID, iItemCount >>>>>>>> line 362 <<<<<<<<<<<<< Response.Write "" & iItemCount & " of item # " & iItemID & " have been added to your cart.
" & vbCrLf Else Response.Write "" & "There is no more stock available to add
" & vbCrLf End If End If End Sub Please suggest me if you can find some error regards Rahul Jul 19 '05 #1 Post Reply Share this Question 3 Replies P: n/a Ray at 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"
You cannot start a new topic This topic is locked Microsoft VBScript runtime error '800a01c9' Rate Topic: #1 larryreed Member Group: Members Posts: 17 Joined: 26-February 06 Posted 28 March 2006 - 02:06 AM Any idea why I would be getting this error? Microsoft VBScript runtime error '800a01c9' This key is already associated with an element of this collection /output/_tournamentsignups_add.asp, line 651 0 Back to top MultiQuote Reply #2 admin Administrator Group: Admin Posts: 14961 Joined: 03-February 03 Posted 28 March 2006 - 05:56 AM Larry, It seems that your query returns duplicate field names. Try to use the field alias. For example Quoteselect table1.name table2.name as name2 Best regards, Sergey Kornilov https://bytes.com/topic/asp-classic/answers/53365-microsoft-vbscript-runtime-error-800a01c9 0 Back to top MultiQuote Reply #3 larryreed Member Group: Members Posts: 17 Joined: 26-February 06 Posted 28 March 2006 - 01:02 PM admin, on Mar 28 2006, 12:56 AM, said:Larry, It seems that your query returns duplicate field names. Try to use the field alias. For example Quoteselect table1.name table2.name as name2 Why does this error not show up on my local machine?, Only when on the remote server? Its using all http://www.asprunner.com/forums/topic/2688-microsoft-vbscript-runtime-error-800a01c9/ of the same output files, and database. 0 Back to top MultiQuote Reply #4 admin Administrator Group: Admin Posts: 14961 Joined: 03-February 03 Posted 28 March 2006 - 01:49 PM Please zip and send generated ASP files to support@xlinesoft.com along with project file and your sample database for investigation. I'll find what's wrong with your project running it on my test box. Best regards, Sergey Kornilov 0 Back to top MultiQuote Reply #5 larryreed Member Group: Members Posts: 17 Joined: 26-February 06 Posted 29 March 2006 - 02:10 PM I have posted the project to a different website and the problem has gone away, must be a problem with the other domain. I will be deleting the other domain and re-adding. Thanks for you recent offer to test it on your test box. Larry 0 Back to top MultiQuote Reply Search Topic Forum Home PHPRunner Forums |-- PHPRunner General questions |-- Tips and tricks ASPRunnerPro Forums |-- ASPRunnerPro General questions |-- Tips and tricks ASPRunner.NET Forums |-- ASPRunner.NET General questions |-- Tips and tricks |-- IronSpeed to ASPRunner.NET transition Miscellaneous |-- Suggestions |-- Xlinesoft Labs |-- Announcements |-- ASPRunner/PHPRunner change log |-- Edit/View Plugins support |---- iPhoneCheckbox plugin support forum |---- ImageMagnifier plugin support forum |---- Multiselect plugin support forum |---- Bootstrap Timepicker support forum |---- Slider plu
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/35778783/vbscript-dictionary-error workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join microsoft vbscript them; it only takes a minute: Sign up VBScript Dictionary Error up vote 1 down vote favorite I'm stuck working on an old project created with classic ASP (VBScript). I've found the dictionary collection type which seems to be what I need. However, it keeps telling me "This key is already associated with an element of this collection." when microsoft vbscript runtime I try to load it from a database recordset. Here is the code. set objRS = objDBConn.Execute("SELECT AreaAbbrev, Area FROM tblArea WHERE CompanyID = 15") Set areaDict = CreateObject("scripting.dictionary") areaDict.CompareMode=vbTextCompare WHILE NOT objRS.EOF Response.Write(objRS("AreaAbbrev") & " ::: " & objRS("Area") & "
") areaDict.add objRS("AreaAbbrev"), objRS("Area") objRS.movenext WEND This is the output: 00K ::: Kellogg 00G ::: Girdler Microsoft VBScript runtime error '800a01c9' This key is already associated with an element of this collection As you can see, "00G" is not the same as "00K". Can anyone tell me why this may be giving me this error? Thanks! dictionary vbscript share|improve this question asked Mar 3 at 17:20 Delford Chaffin 361117 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote After some further research, I found adding .Value in this line fixed the issue: areaDict.add objRS("AreaAbbrev").Value, objRS("Area").Value share|improve this answer answered Mar 3 at 18:34 Delford Chaffin 361117 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up usin