ColdFusion Talk (CF-Talk)
real number returned with comma as decimal delimiter
04/17/12 02:45 P
04/17/12 02:53 P
04/17/12 03:02 P
04/17/2012 02:45 PM
Hi, I have CF9 installed on W7 using an Access database. In a table I have a currency value of -488.7 The windows is French, but I have set the delimiter for both the decimal values AND currency values to dot instead of comma. Though I get this error in CF: The value -488,7 cannot be converted to a number. CF is receiving the value with a comma instead of a dot. - If I browse the table under Access, the value is correctly displayed with a dot. - If I modify the column type to teTEXT instead of real or currency, the value is converted to text with a dot, and there is no error in CF. Obviously a conversion from dot to comma is made in some other layer, but where? I've checked in the ODBC connection and found nothing. Any idea?
Author: John M Bliss
04/17/2012 02:53 PM
Can you reply with the line of code throwing that error and perhaps a few relevant lines above it? On Tue, Apr 17, 2012 at 1:45 PM, <> wrote: ----- Excess quoted text cut - see Original Post for more -----
04/17/2012 03:02 PM
>>Can you reply with the line of code throwing that error and perhaps a few relevant lines above it? It has nothing to do with the code, which by the way works perfectly on my production server under W 3000 in English. The problem occurs in #numberFormat(paiementMontant, "_____9.99")# The error is that paiementMontant contains "-488,7" in the query when the value should be "-488.7". The problem may be not even with CF, but someone somewhere is converting the dot into a comma.
June 20, 2013
Latest Fusion Authority Articles