Schrum, Allan <allan.sch...@rightnow.com> wrote:
> I guess I'm confused as to why sqlite3_column_type() would not work? It works 
> for me on queries and I get back either
> SQLITE_INTEGER, SQLITE_FLOAT, or SQLITE3_TEXT. While I know the types could 
> be coerced to something else, at least it is an
> answer of what you originally intended the column to be.  

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.
-- 
Igor Tandetnik


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to