[thelist] ASP Addition question

Taurus James taurus_james at yahoo.com
Sun Jan 14 12:25:44 CST 2007


ALso, use "IsNumeric" function before trying to cast to Integer:

if IsNumeric(Plans2.Fields.Item("Setupfee").Value) AND
IsNumeric(Plans2.Fields.Item("Setupfee").Value) then

     CInt(Plans2.Fields.Item("Setupfee").Value) +
CInt(Plans3.Fields.Item("Setupfee").Value)

else

     ' Decide what you want to do if either of the values from
the database is corrupted or not returned...

end if

- Taurus


--- Tim Gaunt <info at thesitedoctor.co.uk> wrote:

> Try:
> 
> <%= CInt(Plans2.Fields.Item("Setupfee").Value)+
> CInt(Plans3.Fields.Item("Setupfee").Va
> lue)%>
> 
> (Only if it's an int, otherwise cast accordingly)
> 
> Tim
> 
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> 
> and archives of thelist go to: http://lists.evolt.org 
> Workers of the Web, evolt ! 
> 



 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html



More information about the thelist mailing list