On 6 May 2011, at 3:43am, Tim Butterfield wrote: > The blob values are always inserted and read as a byte[]. If those > bytes are those of a text file, it fails. If I add a leading 0x00 > byte to force it to be binary, it works.
Are you binding your parameters ? If so, check that you're using sqlite3_bind_blob() when binding something to your BLOB column. Binding it as text will not trigger an error, since SQLite is quite happy to bind text into a BLOB column. But if you take blobby data, and bind it using sqlite3_bind_blob() into a column defined as a BLOB SQLite should be retaining and reporting it as as blob, not as text. If you're creating a fully text 'INSERT' or 'UPDATE' command rather than binding parameters, them make sure you're using the correct format to specify you have blob data (is it \x ?) rather than just supplying text. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users