Can Somebody Tell me Why?

Discussion in 'ASP' started by dormingo, Mar 9, 2006.

  1. dormingo

    dormingo New Member

    Joined:
    Mar 3, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    <%
    fremark=""
    
    do while not rsdoc.EOF
    if trim(rsdoc.Fields("fsourcedocno"))=trno then               -------Condition 1
    	[B]fremark=fremark&","&rsdoc.Fields("fsourcedocno")[/B]				
    else
                    if fremark<>"" then                                       -------Condition 2
    	    response.Write("Hello, how are you")
                        response.end
                    end if
                    fremark=rsdoc.Fields("fsourcedocno")
    
    end if
    rsdoc.movenext
    loop											
    %>
    
    Why I cann't get the "Hello, how are you" message if the Condition 1 is false? Can somebody help me to solve it Or change the logic inside..I think the fremark is not a empty string..
     
    Last edited by a moderator: Mar 9, 2006
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,337
    Likes Received:
    377
    Trophy Points:
    83
    Code:
    fremark=fremark&","&
    means that fremark is not empty but contains comma "," in the first run of the while loop.
     
  3. dormingo

    dormingo New Member

    Joined:
    Mar 3, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Thank you guy.. I have got the answer, is my Logic Thinking problems.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,337
    Likes Received:
    377
    Trophy Points:
    83
    My pleasure.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice