Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql rounding numbers Expand / Collapse
Author
Message
Posted Saturday, September 05, 2009 3:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, September 06, 2009 8:01 AM
Points: 2, Visits: 3
I am sending decimal numbers to sql server 2008 express from Flex 3 using ColdFusion. If I set a default value of say 1.5 and send that to sql server it puts it into the table as 2.00. If I do an insertion directly in sql manager the number appears as it should 1.5. Why is it rounding up when I send from flex. This is happening no matter what data type I am using, decimal(4,2), money, float, numeric(6.2).

Can anyone shed some light on this problem?
Post #783397
Posted Sunday, September 06, 2009 5:15 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 5:04 PM
Points: 11,168, Visits: 10,939
One logical possibility is that the client or driver is converting the value to an integer type.
Try tracing the connection with SQL Profiler to see the text of the statement that is arriving at the SQL Server.
If the statement shows a '2', you know it isn't SQL Server doing the conversion.
As always, the more information you post, the better chance we have of helping effectively...

Paul




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #783426
Posted Sunday, September 06, 2009 8:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, September 06, 2009 8:01 AM
Points: 2, Visits: 3
I am using sql server express, so I don't have access to sql profiler.
Post #783471
Posted Sunday, September 06, 2009 8:51 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:07 AM
Points: 5,473, Visits: 23,557
Do you have the ColdFusion debugger?. If so you can track the variable in ColdFusion to see it the problem exists within ColdFusion.

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #783475
Posted Sunday, September 06, 2009 3:29 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 5:04 PM
Points: 11,168, Visits: 10,939
MalindaB (9/6/2009)
I am using sql server express, so I don't have access to sql profiler.

There are at least three things you could do:

1) Download the evaluation edition of SQL Server, which does include Profiler.
2) Try the open-source and free Profiler for Express here
3) Invest a small sum of money in Developer Edition

Paul




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #783542
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse