Just thought of something else. Even if I fix the way a blob is inserted so that it causes it to be correctly detected as a blob by sqlite3_column_type() theres still a problem - because if a field comes back as SQLITE_NULL my application still needs to know what type the field was supposed to be.
On 07/07/10 15:31, Jay A. Kreibich wrote: > On Wed, Jul 07, 2010 at 02:35:58PM +0100, Andrew Wood scratched on the wall: > >> Ok, what if I come at the problem from the opposite side: >> >> The problem is, Ive got a BLOB field which contains a char array as an >> escpaped string but when I call sqlite3_column_type(preparedstatement, >> x); it comes back as SQLITE_TEXT not SQLITE_BLOB >> > It sounds like it is being inserted as a text value (or you're > calling sqlite3_column_bytes16() or something silly). Try > selecting typeof(col) and see what that returns. > > If you're inserting literal values, BLOBs must be in hex. For > example, these will both insert the same three bytes > (ASCII 'A' = 0x41): > > > X'414243' is a BLOB value. > 'ABC' is a text value. > > > -j > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users