diff -ur RSQLite/src/RS-SQLite.c RSQLite/src/RS-SQLite.c --- RSQLite/src/RS-SQLite.c 2007-04-25 22:13:13.000000000 +0530 +++ RSQLite/src/RS-SQLite.c 2007-07-05 19:00:20.444167700 +0530 @@ -903,8 +903,13 @@ col_type = sqlite3_column_type(db_statement, j); if (col_type == SQLITE_NULL) { /* try to get type from origin column */ - col_decltype = sqlite3_column_decltype(db_statement, j); - col_type = SQLite_decltype_to_type(col_decltype); + col_decltype = sqlite3_column_decltype(db_statement, j); + + /* if SQLite doesn't give the information, assume it is an integer */ + if(col_decltype == NULL) + col_type = SQLITE_INTEGER; + else + col_type = SQLite_decltype_to_type(col_decltype); } switch(col_type) { case SQLITE_INTEGER: