Loop

Author Message
dreamzor

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 12/9/2007
  • Status: offline
Loop Sunday, December 09, 2007 7:56 PM (permalink)
0
Hello.
 
I got a ASP page where I got this code.
 
Set d = CreateObject("Scripting.Dictionary")
    d.removeall
    d.CompareMode = 0
 
   For Each x In tmpArray
        If d.Exists(x) Then
            Response.Write "<br> " & x & " Exists"
           
            
        else
        Response.Write "<br>Adding" & x
            d.Add x, x
          
        end if       
       
    Next
 
The ForEach checks to se if the emailadress allready exists in the array, if it does do nothing and if it doesnt, add it to the dictonary.
 
tmpArray contains email adresses that are coma seperated, all that works fine. but when I run this the 2 first adresses allways get added to the dictonary.
 
anyone got a clue what Im doing wrong?
 
#1
    webber123456

    • Total Posts : 58
    • Scores: 0
    • Reward points : 0
    • Joined: 9/20/2007
    • Status: offline
    RE: Loop Monday, December 10, 2007 4:12 AM (permalink)
    0
    debug with response.write statements to see what values are being compared and if they match
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9