Issue
How to insert binary data into the database using Sqlite3 in Python?
Solution
As documented in the documentation, blobs require using a buffer
object:
blob = buffer('data...')
db.execute("INSERT INTO tab(blob) VALUES(?)", [blob]
Answered By - CL.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.