I had a similar problem leading to "parameter count mismatch" error.
I was trying to bind the table name like:
Qt Code:
QSqlQuery q; q.prepare("SELECT * FROM :table"); q.bind(":table", "myTable"); q.exec();To copy to clipboard, switch view to plain text mode
This is not possible, one can only bind filed values.
Could be useful for future readers.
Bookmarks