[Solved] Problem with UPDATE query (QSQLITE)

  • Hi,
    This is my code:
    QSqlQuery qry("QSQLITE");
    qry.prepare("UPDATE candidates SET reference= :areference WHERE pseudo= :apseudo;");
    if (!qry.exec())
    qDebug() << qry.lastError();
    qDebug()<< qry.executedQuery();

    When running, I get these messages:

    *QSqlError("", "Parameter count mismatch", "")
    "UPDATE candidates SET reference= ? WHERE pseudo= ?;" *

    Can someone help me and thank you.

  • Sorry but I have changed reference into reference_entreprise and I have forgotten it.That's why it shows me this problem.
    Now the program works correctly.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.