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.824669167 > 47.824676 / 47.824672667 > 47.824676 / 47.824676 > > I thought that sqlite would store them as text anyways
It won't, unless you declare your column as TEXT (or char, or varchar, or similar) in CREATE TABLE statement. Otherwise it would store a double as a double. Even if you force the value to be stored as text, nothing says that SQLite would internally use printf("%f") and not some other, perhaps more precise, format. > Converting the double to a char* via snprintf and using > sqlite3_bind_text works though. But why would you want to do that? Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users