数据类型为“实数"的问题 [英] problem with data type "real"

查看:81
本文介绍了数据类型为“实数"的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的表中有一个字段,其数据类型为真实".
当我在表格中插入大量数字时,它会像这样保存"1.6238E + 07"
.我怎样才能真实显示插入的数字?
如果有代码,请帮我.
tnx

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

推荐答案

据我所知,.Net中没有real数据类型.
如果您不希望浮点值溢出,则需要使用doubledecimal.
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.


您显示的数字格式为科学计数法或"E"格式.
要以不同的方式显示它,您需要自己明确地进行操作.
几个例子:
-number.ToString(< yourFormat>") http://articles.techrepublic.com.com/5100-10878_11-6103431.html [ ^ ]
-FormatNumber( http://www.vb-helper.com/howto_net_format_number.html [
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


这篇关于数据类型为“实数"的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆