deanlaw / cfcgenerator

Automatically exported from code.google.com/p/cfcgenerator
8 stars 6 forks source link

Scale not added to sqlparam tag #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When introspecting a database column that uses both precision and scale
such as numeric(10,2) the resulting code output sets the sql type correctly
in the cfqueryparam tag:
CFSQLType="cf_sql_numeric"

but it does not set the scale="2" that would be needed to support the
column correctly.

As a result, any numbers inserted into the db will be rounded
inappropriately. i.e., 113.65 will get inserted as 114.00 because CF
assumes a default scale of 0 when none is specified.

Original issue reported on code.google.com by judah.mc...@gmail.com on 18 May 2009 at 5:47

GoogleCodeExporter commented 9 years ago
cfdbinfo returns a column called DECIMAL_DIGITS which should contain the value 
the
needs to be used for the scale attribute on cfqueryparam I believe.

Original comment by judah.mc...@gmail.com on 18 May 2009 at 5:49