I'm working with SQLite, doing insert into table. Folowwing
QSqlQuery testQuery(QString("INSERT INTO test(testcol) VALUES(?)"));
testQuery.bindValue(0, someQStringObg);
testQuery.exec();
works, but
QSqlQuery testQuery(QString("INSERT INTO test(testcol) VALUES(:val)"));
testQuery.bindValue(":val", someQStringObg);
testQuery.exec();
don't. testQuery.lastError().text() returns No query Unable to fetch row
Have no clue why things are that way, but really want to find out.