"Boris Popov" <[EMAIL PROTECTED]> wrote:
> While executing 'SELECT REGION FROM EMPLOYEE' I came across a column that is
> SQLITE_NULL as far as sqlite3_column_type is concerned, but really is
> varchar(20) if you ask for sqlite3_column_decltype? Is varchar(20) illegal
> in SQLite? Certainly looks like "typename ( number )" is okay at
> http://www.sqlite.org/lang_createtable.html
> 

sqlite3_column_type returns the datatype of the information
stored in a particular row of the column - not the declared
type of the column itself.  If you store a NULL in that row,
then sqlite_colulmn_type will return SQLITE_NULL.  If you 
store a blob, it will return SQLITE_BLOB.  If you store text
it will return SQLITE_TEXT.  If you store a numeric value,
the numeric will be converted to text automatically so there
is no way to get an SQLITE_INTEGER or SQLITE_FLOAT from a
varchar() column.
--
D. Richard Hipp   <[EMAIL PROTECTED]>

Reply via email to