Go4Expert

Go4Expert (http://www.go4expert.com/)
-   ASP (http://www.go4expert.com/forums/asp/)
-   -   Can Somebody Tell me Why? (http://www.go4expert.com/forums/tell-t619/)

dormingo 9Mar2006 13:30

Can Somebody Tell me Why?
 
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..

shabbir 9Mar2006 13:54

Re: Can Somebody Tell me Why?
 
Code: ASP

fremark=fremark&","&

means that fremark is not empty but contains comma "," in the first run of the while loop.

dormingo 9Mar2006 16:41

Re: Can Somebody Tell me Why?
 
Thank you guy.. I have got the answer, is my Logic Thinking problems.

shabbir 9Mar2006 17:43

Re: Can Somebody Tell me Why?
 
Quote:

Originally Posted by dormingo
Thank you guy.. I have got the answer, is my Logic Thinking problems.

My pleasure.


All times are GMT +5.5. The time now is 00:16.