Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a field in my table that it's data type is"real" .
when i insert large number into my table ,it save like this"1.6238E+07"
.how can i show my numbet in true way that i insert?
if there is a code ,plz help me.
tnx
Posted

As far as I know, there is no real data type in .Net.

You need to use double or decimal if you don't want your floating point values to overflow.
 
Share this answer
 
The number you show is formatted as scientific notation or "E" format.
To display it differently you need to explicitly do it yourself.
A few examples :
- number.ToString("<yourFormat>") http://articles.techrepublic.com.com/5100-10878_11-6103431.html[^]
- FormatNumber (http://www.vb-helper.com/howto_net_format_number.html[^])

Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900