An empty string is not a number. You need to default it to 1 or do a conditional check and only perform the multiplication if the value is numeric.
On Tue, Apr 15, 2008 at 2:52 PM, Ben Conner <[EMAIL PROTECTED]> wrote: > Hi, > > I've set up a cftry/catch around a piece of code that I am having > problems with and the resulting error report I'm not sure about the > interpretation. > > What came back was: > > The value "" cannot be converted to a number > > coldfusion.runtime.Cast$NumberConversionException: The value "" cannot > be converted to a number at > coldfusion.runtime.Cast._double(Cast.java:384) at > coldfusion.runtime.Cast._double(Cast.java:522) at > > cfstorecart2ecfm68181532.runPage(D:\sites\adrenalinebikes.com\htdocs\storecart.cfm:156) > at > > Is this telling me the problem was on line #156 in the storecart.cfm > program? > > If so, on that line I find: > > <cfset LineShip = Session.Basket.Quantity * Product.ShipBase > > > Both fields are numeric, although shipbase could be null. ?? > > --Ben > > +-------------------------------------------+ > + Ben Conner [EMAIL PROTECTED] + > + Web World, Inc. 888-206-6486 + > + PO Box 1122 480-704-2000 + > + Queen Creek, AZ 85242 + > +-------------------------------------------+ > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303464 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4