display of non-integer numbers in table

Discussion in 'Questions (Windows Mobile)' started by RB Smissaert, Jan 4, 2009.

  1. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    When I have a SQLite table with a field that is defined as REAL (in the create table SQL) and where all the values in that field are rounded to 2 decimals (update table1 set field1 = round(field1, 2) then when I get that SQLite in a table control (cmd.ExecuteTable etc.) then there will be more than 2 decimals showing in the table control.
    The only way to get the 2 decimals and no more is to do another round in the cmd.CommandText.
    Is this a bug or am I missing something here?
    This is both on the desktop and the device.

  2. Erel

    Erel Administrator Staff Member Licensed User

    The number is stored in the database as a binary number, not a string.
    It is possible that the binary representation is not completely accurate. So you get trailing zeroes.
  3. RB Smissaert

    RB Smissaert Well-Known Member Licensed User

    Yes, that must be it.
    Other apps though somehow don't show these extra figures.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice