Quote Originally Posted by jacek View Post
If you pass a string to QSqlQuery constructor, it will execute it immediately. It should be:
Qt Code:
  1. QSqlQuery query;
  2. query.prepare("UPDATE pictures SET data=? WHERE rowid=1;");
  3. query.addBindValue(fileData);
  4. query.exec();
To copy to clipboard, switch view to plain text mode 

And the select should be:
Qt Code:
  1. QSqlQuery query( "SELECT data FROM pictures WHERE rowid=1;" );
  2. query.next(); // <- positions the query on the first row
  3. QSqlRecord record = query.record();
To copy to clipboard, switch view to plain text mode 
Okay, thank you
Quote Originally Posted by Thomas View Post
One last issue.
Make sure you delete stuff which you created with new.
I thought Qt is handling such things for all the classes that inherit QObject, at least their own stuff? Okay, thx I'll add everything to my destructors