Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't store correctly a "double" in Access

Status
Not open for further replies.

caifa

Programmer
Jul 21, 2009
3
IT
Hi folks!

I can't store correctly a "double" into an Access database (I'm using ASP/Vbscript).

Specifically I have a variable, with 2 decimal places:

foo = FormatNumber(CDbl(10,60),2)

I want to insert this variable in Access in a field with type Number, Field Size Double and 2 decimal places.

The INSERT statement executes without any error, but when I query the table I see 1.060,00 instead of 10,60!!!

I've tried to set the data type to "Currency" or to set the field size to "Decimal", but neither work...

How can I solve this mistake? Any help would be appreciated!
 
What about this ?
foo = CDec(10.60)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
You may try this:
foo = CCur(10.60)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top