-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/15/2010 02:16 PM, Simon Slavin wrote: > An image file is just a file. If you really want to store a file in a > database, open the file, read the contents, and store what you read in a BLOB > field.
That is the general correct answer but not useful in this case. Just like SQLite Python also does dynamic/manifest typing. That means you have to supply the file contents in the appropriate type. Python 2 makes no distinction between regular strings and sequences of bytes so just providing the contents of a file would cause it to be regarded as a string. Python 3 does make the distinction so this is no longer an issue. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwX8A0ACgkQmOOfHg372QRgZgCgnP+U0tEHAPFoNxhHxuwNMTYn 7wgAoLiRJnn3RdiSWPPScM3p3jmTJA8E =oMVD -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users