Now the COMMIT fail and i show a message and do nothing. Is that OK?
Qt Code:
  1. QSqlDatabase db = QSqlDatabase::database();
  2. db.transaction();
  3.  
  4. if ( !q.exec("SELECT;") )
  5. db.rollback();
  6.  
  7. q.clear();
  8. if(!db.commit())
To copy to clipboard, switch view to plain text mode