On 30 Nov 2009, at 1:50pm, Michael Lippautz wrote: > I am using sqlite_bind_double on a prepared statement (C API). The > insert completes, however, the value stored in the sqlite table is > different from the output of a casual printf("%f",..)
By 'different' do you mean that it is obviously a different number, or do you mean that it's pretty-much the same number, just shown in the same way ? Could you give a couple of examples ? > Am I wrong when assuming that they should be the same. (double values > are gathered by a gps and are in range of %1.6f up to %3.9f You could gather the number as a %3.9f, but your value is stored purely as a number -- no formatting at all. You could get a %2.2f out again, as long as the two numbers are equal to one-another (or very nearly so). If you want the numbers stored with formatting, define the columns as TEXT, and bind the values to the INSERT instruction as string values, not numbers. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users