You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by jfb <j....@verizon.net> on 2014/01/19 00:48:50 UTC

Issue with numbers

Hi,
I am getting data from sql server using Coldfusion remote connection. I
capture the data in arrayCollection that will be use in an advancedDatagrid
as:
public function getContracts_Handler(event:ResultEvent):void{
	acContracts = ArrayCollection(event.result);
	contract_dg.dataProvider = acContracts;
}

Couple of my fields in the database are contractID (integer) and price
(money).
The array collection see the contractID as number but not the price field,
the price is an string, the same happens with sql server numeric or decimal
field.
It is a way to tell the arrayCollection that my field price is numeric?
Can i do something in my select statement? I don't want to convert the money
field to integer.
Any ideas about this issue?
Thanks




--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Issue-with-numbers-tp4492.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Issue with numbers

Posted by Franck Wolff <fr...@gmail.com>.
You can be also interested in GraniteDS ActionScript3 support of Long,
BigInteger and BigDecimal types:
http://www.granitedataservices.com/public/docs/3.0.1/docs/reference/flex/graniteds-refguide-flex.html#graniteds.bignumbers


2014/1/19 jfb <j....@verizon.net>

> Thanks for you reply and help!
> That help me to get going...
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Issue-with-numbers-tp4492p4495.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Issue with numbers

Posted by jfb <j....@verizon.net>.
Thanks for you reply and help!
That help me to get going... 



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Issue-with-numbers-tp4492p4495.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Issue with numbers

Posted by Romain KELIFA <ro...@gmail.com>.
hi !
those two do not actually cast values, but read or 'parse' them, returning
the alpha-numeric parts converted to either int (parseInt) or Number
(parseFloat). Additionally parseInt lets you specify a radix to convert
between decimal, hexadecimal, octal, or whatever number-systems.
so for example :
you have "123.45 $" (String)
with parseInt : 123 (int)
with parseFloat : 123.45 (Number)
Le 19 janv. 2014 01:03, "jfb" <j....@verizon.net> a écrit :

> For now in my calculations i am converting the field price to number using
> Number(field).
> I saw other functions parseFloat() and and parseInt().
> Anyone can explain the differences?
> Thanks
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Issue-with-numbers-tp4492p4493.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>

Re: Issue with numbers

Posted by jfb <j....@verizon.net>.
For now in my calculations i am converting the field price to number using
Number(field).
I saw other functions parseFloat() and and parseInt().
Anyone can explain the differences?
Thanks
 



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Issue-with-numbers-tp4492p4493.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.