On 09/09/10 00:01, Igor Tandetnik wrote: > No. sqlite3_column_type returns the type of the value in the given column and > the current row. The type reported by sqlite3_column_type may change from row > to row. It is largely unrelated to the type "you originally intended the > column to be" (SQLite doesn't really have such a concept; column affinity > comes closest, but there's no API to report it, directly). > > In particular, if the value in the current row is null, sqlite3_column_type > returns SQLITE_NULL. > Exactly....but....
On 09/09/10 00:07, Nicolas Williams wrote: > You can use CHECK() expressions to ensure all values are of the intended > type, and you can use NOT NULL to avoid NULL (or treat NULL as being of > whatever type sqlite3_column_type() reports). > > There may be a nugget of a solution here. I'll do some experimenting. One related question. The library Im using maps numeric types to one of the following C types: unsigned long int signed long int unsigned int (short) signed int (short) float double How does SQLite distinguish between ordinary floats and doubles, and between long & short ints, and signed or unsigned ints? _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

