Yammaski 0 Posted February 2, 2011 Report Share Posted February 2, 2011 This works when the varPostcode is even or odd, but when I change (1235) to a value from my database (rsTest.Fields.Item("Postcode").Value), it doesn't work anymore. I tried it with CInt, but also no result. Postcode is as "text" in the db. <%varPostcode=(1235)Call OddEvenNumber(varPostcode)Sub OddEvenNumber(iNumber)If iNumber MOD 2 = 0 ThenResponse.write ("EVEN")ElseResponse.write ("ODD")End IfEnd Sub%> Quote Link to post Share on other sites
shaffiq_fiq88 0 Posted February 18, 2011 Report Share Posted February 18, 2011 I'd try it. It works fine. Dim NumValNumVal = Int([i]from database[/i])If Not isNumeric(NumVal) ThenResponse.Write "Not a set of number."ElseResponse.Write "A set of number is processed." ' This line is returned in my browser. Please check your script and database once again.End If Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.