title: Insert binary file in SQLite database with Python
body: <p>I'm trying to write a simple Python script that inserts .odt documents into an SQLite database. Here is what I have done so far, but it doesn't seem to work:</p>
  
  <pre><code>f=open('Loremipsum.odt', 'rb')
  k=f.read()
  f.close()
  cursor.execute="INSERT INTO notes (note) VALUES ('%s')" %(sqlite.Binary(k))
  cursor.close()
  conn.close()
  </code></pre>
  
  <p>I don't get any error messages, but as far as I can see the record is not inserted. What am I doing wrong? Also, how can I extract the stored document back? Thanks!</p>