A new question about database????

  • my programme writes" QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");"
    QSqlQuery query;

    now the mistake is:" ...QSqlQuery::exec: database not open" can you solve this question ? thanks

  • You should call @ db.open() @ before executing queries.

  • And you should select an actual database at that. Not just a driver.

Log in to reply

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