Problema ao usar sql bindvalue no QT 5.1



  • o codigo abaixo funciona no qt 4.8 mas no 5.1 o bindvalue não faz a atribuição no lugar fica só "?"
    o "query.executedQuery()" retorna "SELECT image_id, name FROM backgrounds WHERE id = ?"

    @ QSqlQuery query(db);

    query.prepare(QString("SELECT image_id, name FROM backgrounds WHERE id = :id"));
    query.bindValue("id", id);
    
    query.exec();@

Log in to reply
 

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