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
I want a way to detect that it should really be a blob not a string so that its interpreted as a char array rather than just a regular string. I seem to recall in MySQL you can check this by testing the charset of the string. On 07/07/10 13:37, Jay A. Kreibich wrote: > On Wed, Jul 07, 2010 at 12:32:53PM +0100, Andrew Wood scratched on the wall: > >> Is there not just a function which will take the index of a column and >> return its declared type? >> > Not in the general case. sqlite3_column_decltype() will do it for > SELECT statements, but only if the result-set column is a direct > column reference, and only if SQLite is compiled to handle meta-data. > > Declared types are fairly unimportant in SQLite. They don't mean > much. Most applications never need to deal with them. > > -j > > >> On 07/07/10 04:41, Jay A. Kreibich wrote: >> >>> On Tue, Jul 06, 2010 at 11:27:09PM +0100, Andrew Wood scratched on the wall: >>> >>> >>>> How can I find out the declared type of a column. >>>> >>>> >>> If you just want to know the declared type of a column you already >>> know about, it use "PRAGMA table_info". >>> >>> http://www.sqlite.org/pragma.html >>> >>> -j >>> > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users