Hi everyone,
So basically, I've been have some problems with QSQL code so i tested it with both the mysql driver and postgresql driver. It works perfectly with the mysql database however when i run the same thing with the postgresql driver i get the following error. And I have to use postgresql it's for my senior project

Qt Code:
  1. QPSQL: Unable to create query"
  2. query failed: "ERROR: syntax error at or near "("
  3. LINE 1: EXECUTE ('Don''t Say No', '21:03', 'Twenty One O Three', '/..
  4. ^
To copy to clipboard, switch view to plain text mode 

I don't know where that EXECUTE command comes from, and i check the error log on the server and the same query shows when i'm doing an INSERT

has an anyone seen this before ??
thanks in advance

Qt Code:
  1. QSqlQuery query("INSERT INTO tracks (title, artist, album, path, duration) VALUES ( ?, ?, ?, ?, ? )");
  2.  
  3. query.addBindValue(QString(f.tag()->title().toCString()));
  4. query.addBindValue(QString(f.tag()->artist().toCString()));
  5. query.addBindValue(QString(f.tag()->album().toCString()));
  6. query.addBindValue(it.filePath());
  7. query.addBindValue(QString(f.audioProperties()->length()));
  8. if(query.exec()) {
  9. qDebug() << query.lastQuery();
  10. } else {
  11. qDebug() << "query failed: " << query.lastError().text();
  12. }
To copy to clipboard, switch view to plain text mode