[PyQt] Syntax to access a blob column on sqlite

IloChab ilochab at gmail.com
Sun Mar 28 16:54:33 BST 2010


I tried in this way:

blobField = QtCore.QVariant ( QtCore.QByteArray ([1,2,3,]) )
query = QtSql.QSqlQuery()
query.prepare("""INSERT INTO blobTable (blobColumn) VALUES(?)""")
query.bindValue(0,(blobField,));
query.exec_();


... and I got no error, but in the DB I find an empty field: (u'')


Which is the correct syntax to store a blob field???


More information about the PyQt mailing list