Skip to main content
Participating Frequently
November 2, 2010
Question

"The value '' cannot be converted to a number"

  • November 2, 2010
  • 1 reply
  • 1736 views

The value '' cannot be converted to a number

(thats 2 ' not 1 " by the way)

This appears out of the blue when i click Completed Orders on our web based point of sale software.

It occurs on the line stating:

£#NumberFormat((rstotal.subtotal + rsorders.orderpostage),'.__')#

Its extremely odd as we currently have 2 sites with exactly the same code in their POS, one works, one doesnt. :/.

This just suddenly started happening in the last few hours.

Im absolutely stumped. Originally i thought it may be because somehow the table had changed its default to NULL, but it hasnt, its exactly as it should be.

The only modifications ive made to the database are 2 CREATE TABLE query's.

Any help'd be much appreciated.

All sales need to be entered by midnight tonight otherwise the accountant is going to be pissed >_<

    This topic has been closed for replies.

    1 reply

    Inspiring
    November 2, 2010

    rstotal.subtotal and rsorders.orderpostage

    If you output the two values involved, are they numeric or just an empty string?

    DedbultAuthor
    Participating Frequently
    November 2, 2010

    From what i can see, the values are numeric.

    Inspiring
    November 2, 2010

    1. Do a view source in the browser when you get the error - make sure that there really is just a space between those apostrophes, and not something else that the browser isn't rendering in the error message display.

    2. Put an isNumeric() in a CFIF before the line that is getting the error, and if it fails dump out the contents of the field between two printable delimiters.  maybe dump the length as well.  maybe dump it in decimal, just in case there is a control character in there - maybe from a copy/paste gone bad.

    -reed