Yammaski Posted February 2, 2011 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%> Link to comment Share on other sites More sharing options...
shaffiq_fiq88 Posted February 18, 2011 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.