I&#039m having a problem with the vbscript dictionary object.<BR>I reference the dictionary object within a dll that is called from an asp.<BR>The problem occurs within the dll. Here is the scenario:<BR>I have a function that returns an object of type variant, the object that it returns is a dictionary object.<BR>That function puts three key, item pairs into the dictionary and returns it. In another function I create another <BR>dictionary object and set it to the returned dictionary of the aforementioned function. When I list the<BR>contents of the dictionary object it has all the keys but when I try to access an item in the dictionary it gives me an <BR>asp 0115 error A trappable error occurred in an external object. The script cannot continue running. <BR><BR>Anyone know why this is occuring?<BR>Here is a run down of the code I basically have:<BR><BR>Public Function getDictionaryObject() As Variant<BR> Dim newObj as New Dictionary<BR> newObj("Key1") = "Item1"<BR> newObj("Key2") = "Item2"<BR> newObj("Key3") = "Item3"<BR> newObj("Key4") = "Item4"<BR> <BR> for each item in newObj.keys<BR> writeLine "filename.txt", CStr( item & " : " & newObj(item) )<BR> next<BR><BR> set getDictionaryObject = newObj<BR><BR>End Function<BR><BR>Public Sub ShowDictionary()<BR> Dim testObj As New Dictionary<BR> set testObj = getDictionaryObject()<BR> <BR> for each item in testObj.keys<BR> writeLine "filename.txt", CStr( item & " : " & testObj(item) )<BR> next<BR>End Sub<BR><BR>the function writeLine is something I wrote that will print the given string to the given filename<BR><BR>basically my problem is this:<BR>the for loop in the getDictionaryObject() function works fine printint out all the keys and items<BR>but the for loop in the ShowDictionary() function prints out the first key, item pair -&#062; ("Key1", "Item1")<BR>but it gives me an error on any other key, item pair. <BR>When I debugged it some more, I found out that the keys are there. So if I put this into the ShowDictionary() function<BR>it works fine:<BR><BR>for each item in testObj.keys<BR> writeLine "filename.txt", CStr(item)<BR>next<BR>it prints out all the keys<BR><BR>but if i do this:<BR><BR>for each item in testObj.items<BR> writeLine "filename.txt", CStr(item)<BR>next<BR>it prints out the first item, but any other item gives me the error:<BR><BR>error &#039ASP 0115&#039 <BR>Unexpected error <BR>A trappable error occurred in an external object. The script cannot continue running. <BR><BR>Any ideas what is going on? I know the dictionary object is plagued with problems so hopefully someone knows what is going <BR>on here.<BR><BR>Thanks<BR>