Try using cInt to make sure that a and b are both the same data type for
the comparison.

while not rs.eof
    a=cInt(rs(0))
    b=cInt(project)
    response.write a
    response.write b
    if(cint(a<>b) then
        response.write rs(0)
    else
        response.write "hello"
    end if
    rs.movenext
wend

Dan
 
________________________________

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Jegatha
Sent: 18 August 2005 11:05
To: Asp
Subject: [AspClassicAnyQuestionIsOk] if condition


i m using the following code,it should return hello but it shows the
results of
rs(0).

while not rs.eof
a=rs(0) /****the value of rs(0)=1*****/
b=project /*****the value of project=1****/
response.write a
response.write b
if(a<>b) then
response.write rs(0)
else
response.write "hello"
end if
rs.movenext
wend

     i couldn't findout the problem.can any one sort out this.

thanks in adv

Regards,
Jegatha


            
---------------------------------
Check out Yahoo! India Rakhi Special for Rakhi shopping, contests and
lots more. 
http://in.promos.yahoo.com/rakhi/index.html

[Non-text portions of this message have been removed]



________________________________

YAHOO! GROUPS LINKS 


        *        Visit your group "AspClassicAnyQuestionIsOk
<http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk> " on the web.
          
*        To unsubscribe from this group, send an email to:
         [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
subscribe> 
          
*        Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> . 


________________________________




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hdojbrr/M=362329.6886308.7839368.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124369437/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to