Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6105419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:58:18+00:00 2026-05-23T13:58:18+00:00

I store some numbers in a ‘real’ type field. I insert/read values to/from it

  • 0

I store some numbers in a ‘real’ type field.

I insert/read values to/from it from my c# application using ADO.net. When I query my data in Server Management Studio I can see it converts my numbers into scientific normal format, like: 2,211221E+07. I did not set anythig to do this, everything is default.

How can I avoid this behaviour?

MS SQL Server 2008 Express/.Net 4/VS2010

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:58:18+00:00Added an answer on May 23, 2026 at 1:58 pm

    It doesn’t convert your reals (IEEE floating points) into scientific format: that’s how it displays them in SSMS. Here’s how ADO.Net maps data types between SQL Server and the .Net world: http://msdn.microsoft.com/en-us/library/cc716729.aspx

    For floating point types, SQL Server implements the ISO data type float(n), where n is the size of the mantissa in bits (1-53 inclusive). real is a synonym for float(24); float is a synonym for float(53).

    Rather as you might expect, floating point columns with a mantissa 1-24 bits in size are mapped to/from System.Single; whilst those with mantissa more than 24 bits in size are mapped to System.Double.

    Sql Server’s money and smallmoney data types really have little to do with money. They are just fixed-precision decimals, with a precision of 4 decimal places (1/10000 of a unit). Ado.Net maps money and smallmoney to System.Decimal and maps System.Decimal to money (there is no mapping to smallmoney). This conversion suffers from something of an impedance mismatch, however, System.Decimal being a decimal floating point format. The conversion to/from SQL Server’s money datatype can result in

    • Loss of precision. If the System.Decimal value has more than 4 digits to the right of the decimal point, the extra digits are lost.
    • Gain of precision. If the `System.Decimal value has less than 4 digits to the right of the decimal point, in the conversion to money, it gains precision in the form of extra digits (trialing zeros) to the right of the decimal point. That extra precision is maintained when it it read back from SQL Server.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to read some numbers (double) from a file and store them in
My application uses NSUserDefaults to store some values so that it can restore them
I'm using http://www.phpaes.com/ to encrypt some values and store them in a MySQL database.
I store some time values in sqlite in %H:%M string format (for example 15:43),
I need to store some simple properties in a file and access them from
I need to store some values in the database, distance, weight etc. In my
I have two arrays containing different keys and values. However, some keys store strings
I am trying to read words and numbers from a space and tab delimited
i am using big numbers (18 digits), so i store it into long variables.
currently, I am using a SQLite database with some addresses and telephone numbers. All

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.