I have developed an RIA for a company's external sales force where they can view relevant information regarding thier customers before a site visit.
The data resides in SQL and is set to default to zero if any of the values are NULL. For exam开发者_开发技巧ple
(SELECT ISNULL(SUM(ISNULL( FMS2.NotDueLCY, 0)), 0) AS NotDueLCY
FROM dbo.FLEX_BalanceOverdue AS FMS2
WHERE
FMS2.ShipToCode LIKE @ShipToCode
AND
FMS2.Customer LIKE @Customer
AND
FMS2.SalesPersonCode LIKE @SalesPerson) AS NotDueLCY
If this query is Executed the data looks correct. This query is in a Stroed Procedure. I then use coldfusion to inoke these SP's
If it is executed using CF the Zero Values appear in the browser window as 0E-20 and susequently this data also appears in Flex as 0E-20
I am a bit stumped as to what is causing this. If any of you have some ideas I would be most grateful BD :)
Managed to fix this. I had to handle the fact that a NaN was hitting the Flex app when the value of data was a zero and after some thorough checking only a zero. So once that was apparent I applied a label function to the data grid displaying the data. Telling it if a NaN was in the data set display a Zero. Not solved the root of the issue but a tidy work around
It possibly something to do with the way its coming out of your Stored Procedure. If you're using cfstoredprocedure to call your SP you could use cfprocparam to ensure that it is returning the values as the expected datatype.
If you're using CFQuery to call your SP, you'll probably need to CAST your columns on the SP side to make sure that the result is returned as the correct datatype.
精彩评论