ShadowBelmolve
9th September 2010, 01:46
Hello, I'm having a strage problem, I'm using Qt 4.6.3 and sqlite 3.7.2 and a certain query return results from sqlite command line but don't return anything from QSqlQuery
The query
SELECT DISTINCT(incomings.id) FROM incomings JOIN incoming_products ON incoming_products.incoming_id = incomings.id WHERE incoming_products.name LIKE '%ar%'
a part of code
QSqlQuery query;
qDebug() << query.exec("SELECT DISTINCT(incomings.id) FROM incomings JOIN incoming_products ON incoming_products.incoming_id = incomings.id WHERE incoming_products.name LIKE '%ar%'");
qDebug() << query.size();
the output
true
-1
this is the only query of my app that don't work and the only thing I need to finish my app :(
anybody know why this don't work?
The query
SELECT DISTINCT(incomings.id) FROM incomings JOIN incoming_products ON incoming_products.incoming_id = incomings.id WHERE incoming_products.name LIKE '%ar%'
a part of code
QSqlQuery query;
qDebug() << query.exec("SELECT DISTINCT(incomings.id) FROM incomings JOIN incoming_products ON incoming_products.incoming_id = incomings.id WHERE incoming_products.name LIKE '%ar%'");
qDebug() << query.size();
the output
true
-1
this is the only query of my app that don't work and the only thing I need to finish my app :(
anybody know why this don't work?