I think you can find the answers here :
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/?localDatabase
SQLSupport.html#dataTypes
(I'd been meaning to look this up in any case, you just prompted me! Not
finished reading it all as yet.)
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of bredwards358
Sent: 21 July 2008 13:25
To: [email protected]
Subject: [flexcoders] Numeric values drawn from a database, always int?
So far so good in the application currently in development, I feel
like I'm in the home stretch. However something has come up which
could prove to be a roadblock in the near future. There are some
values which need to be totaled up and some of those need decimals.
Now I realize that the int datatype doesn't deal with that, and the
only thing I've seen thus far which fills the same purpose as a double
datatype is the Number datatype. However when I try something like this:
for(var i:int; i < n; i++)
{
total2 += dgProvider[i].ProductList;
total3 += dgProvider[i].Cost;
}
If total2 and total3 are of the Number datatype, the result will
display as NaN or "Not a Number". This works fine however if total2
and total3 are declared as int. What I'm wondering is, are numeric
values drawn from a database (SQL Lite here) automatically cast as
int? Even if the database has them as NUMERIC and not INTEGER? If so,
then would I be able to work around this by doing something like this?
for(var i:int; i < n; i++)
{
total2 += Number(dgProvider[i].ProductList);
total3 += Number(dgProvider[i].Cost);
}
I'm just asking for some clarification on this before I finally get
around to it after finishing up a few things on this project. Thanks
in advance,
Brian Ross Edwards
Tech-Connect LLC
______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in
England and Wales with registration No. 02622298 and registered office: 4th
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT
registration No. 648874577.
This e-mail is confidential and may be privileged. It may be read, copied and
used only by the intended recipient. If you have received it in error, please
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637
1010. Please then delete the e-mail and do not disclose its contents to any
person.
This email has been scanned for Primal Pictures by the MessageLabs Email
Security System.
______________________________________________________________________