On 15 Jun 2010, at 10:26pm, Roger Binns wrote:

> 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.

Thank you.  I continue to learn.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to