Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    1

    Question Unanswered: Decimal values get truncated when using SqlDataReader in C# .net

    The values that are being fetched from the database are not being read as is , when there are decimal values with 10 or more digits after the point, the values are truncated (approximated) to 8 digits

    The approximation is not consistent in all the cases
    Some times depending on the numbers for example 0.434000001 is truncated to 0.434.

    This is happening when i read the values from the sql database using the SqlDataReader.GetValue method into an ArrayList in C# .NET

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Looks like you r datatype is (the flaky) float.

    What is it?

    Did you try defining it as decimal?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •