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

Originally Posted by
MarkoSan
QSqlQuery::value: not positioned on a valid record
You don't invoke QSqlQuery::next() before value().
Also better use bindValue() to avoid SQL injection:
q.prepare( "SELECT * FROM `eros`.`merchandize` WHERE PicPath= :path" );
q.bindValue( ":path", strPicPath );
if( q.exec() ) {
while( q.next() ) {
// ...
}
}
else {
// error
}
QSqlQuery q;
q.prepare( "SELECT * FROM `eros`.`merchandize` WHERE PicPath= :path" );
q.bindValue( ":path", strPicPath );
if( q.exec() ) {
while( q.next() ) {
// ...
}
}
else {
// error
}
To copy to clipboard, switch view to plain text mode
Bookmarks