QSql is a news for me ……
But I open correctly my db (with error test), insert correcly my data, update correctly too …. but have some problem with these piece of code:
int p = 0;
QSqlQuery qy(db);
qy.prepare("SELECT id_pro1 FROM program WHERE pro1 = :pro1)");
qy.bindValue(":pro1", "ffff");
qy.exec();
qy.next();
p = qy.record().toInt();
ui->lcdNumber_2->display(p);
qy.clear();
I tray some method ( .value, .arg) but obtain only p=0 ….. I dont Understand why.
↧