Quote Originally Posted by MarkoSan View Post
warning: QSqlError(-1, "", "")
This actually means that there is no error.

Quote Originally Posted by MarkoSan View Post
QSqlQuery::value: not positioned on a valid record
You don't invoke QSqlQuery::next() before value().

Also better use bindValue() to avoid SQL injection:
Qt Code:
  1. q.prepare( "SELECT * FROM `eros`.`merchandize` WHERE PicPath= :path" );
  2. q.bindValue( ":path", strPicPath );
  3. if( q.exec() ) {
  4. while( q.next() ) {
  5. // ...
  6. }
  7. }
  8. else {
  9. // error
  10. }
To copy to clipboard, switch view to plain text mode