> Two things that confuse me. Why did casting as BigDouble not n solve
> this problem.Why did coldfusion chose "float" as the type, since the
> MySQL type was NOT float, it was Decimal(10,2). I did a GetMetaData()
> on the query, and the numeric columns have "TypeName" = "DECIMAL" as
> they should.
>
MySQL datatypes and the underlying datatype the your CFML uses may not
exactly one to one compatible. There is not "numeric" datatype in Java
(which ultimately will be the decider) and so it appears CF used the
Java primitive "float" as the Java type. This however is wrong
according to the conversion chart for the JDBC driver -- stating the
"decimal" in MySQL should be "BigDecimial" in Java:
http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-type-conversions.html
Base on a couple of comments on Ben Nadel's blog, it looks like the
behavior changed to this in CF8+. Could be that they switched the
official MySQL driver in that release. It's hard to tell what's going
on because CF is a closed source product.
.pjf
Brian H. said the following on 08/13/2010 12:33 AM: