Re: [sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Michael Lippautz
QL data stored as GPS floats. > > Nick. > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin > Sent: 30 November 2009 14:59 > To: General Discussion of SQLite Database > Sub

Re: [sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Nick Shaw
ta stored as GPS floats. Nick. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: 30 November 2009 14:59 To: General Discussion of SQLite Database Subject: Re: [sqlite] sqlite3 bind and insert double valu

Re: [sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Simon Slavin
On 30 Nov 2009, at 2:05pm, Michael Lippautz wrote: > 47.824669 / 47.824669167 Same number. If you need better precision than that, declare the column type as TEXT and bind your data as text. But since you're using GPS coordinates I can tell you it's not necessary. That seventh digit in a GP

Re: [sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Igor Tandetnik
Michael Lippautz wrote: > Well, I compared a casual printf("%f\n",val) with the entry stored in > the database (as REAL). The entry is inserted into the db via > sqlite3_bind_double (prepare/reset/step) > > Some examples: > fprintf / database (looked up via .dump on the table) > 47.824669 / 47.824

Re: [sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Michael Lippautz
Thanks for helping (all)! Well, I compared a casual printf("%f\n",val) with the entry stored in the database (as REAL). The entry is inserted into the db via sqlite3_bind_double (prepare/reset/step) Some examples: fprintf / database (looked up via .dump on the table) 47.824669 / 47.824669167 47.8

Re: [sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Igor Tandetnik
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",..) How do you determine this? Have you retrieved the value back from the database

Re: [sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Simon Slavin
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 d

Re: [sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Nick Shaw
Subject: [sqlite] sqlite3 bind and insert double values Hej, 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",..) Am I wrong when assuming that they sho

[sqlite] sqlite3 bind and insert double values

2009-11-30 Thread Michael Lippautz
Hej, 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",..) Am I wrong when assuming that they should be the same. (double values are gathered by a gps and are in r