If you're losing all the digits after the decimal point, you've got
your column defined incorrectly.  Both 4.1 and 5.0 handle DECIMAL
columns, including arbitrary numbers of fractional digits without
issue.  I'd guess that there was some subtle change in the handling
between 4.1->5.0, and that's the source of the problem, since I know
it works just find on both versions.

Here's a column def I use with MySQL 5:

    hourlyRate decimal(10,2) not null

That says use 2 fractional digits and 8 (10 - 2) integral digits.

cheers,
barneyb

On 9/30/07, Rick Faircloth <[EMAIL PROTECTED]> wrote:
> Hi, all.
>
>
>
> This does actually involve CF 8, (and yes, I'm on CF 8 now, from 4.5
>
> with my new VPS from ahphosting.com!) since I manipulate the value
>
> (typically, MySQL 4.1) before inserting.
>
>
>
> I've got a MySQL field of decimal for the monetary value.
>
>
>
> Previously, in MySQL 4.1, I would use decimal as the field type.
>
>
>
> Upon inserting I would use lsparsecurrency(fieldname) and
>
> insert.  Worked fine MySQL 4.1.
>
>
>
> But 5.0 drops the digits after the decimal upon storage.
>
> I'm looking for the right combination of SQL and CF code to
>
> properly format, store, and retrieve the monetary value.
>
>
>
> Clues anyone?
>
>
>
> Rick
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289817
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to