Qt QSqlQuery bindValue trabalha com? mas não com: espaços reservados
Estou trabalhando com SQLite, inserindo na tabela. Folowwing
QSqlQuery testQuery(QString("INSERT INTO test(testcol) VALUES(?)"));
testQuery.bindValue(0, someQStringObg);
testQuery.exec();
funciona, mas
QSqlQuery testQuery(QString("INSERT INTO test(testcol) VALUES(:val)"));
testQuery.bindValue(":val", someQStringObg);
testQuery.exec();
não. retorna testQuery.lastError (). text ()Nenhuma consulta Não foi possível buscar a linha
Não tenho idéia de por que as coisas são assim, mas realmente quero descobrir.