Can Somebody Tell me Why?

dormingo's Avatar, Join Date: Mar 2006
Newbie Member
Code: ASP
<%
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 shabbir; 9Mar2006 at 13:51.. Reason: Syntax highlighting
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Code: ASP
fremark=fremark&","&
means that fremark is not empty but contains comma "," in the first run of the while loop.
dormingo's Avatar, Join Date: Mar 2006
Newbie Member
Thank you guy.. I have got the answer, is my Logic Thinking problems.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by dormingo
Thank you guy.. I have got the answer, is my Logic Thinking problems.
My pleasure.