Hello,

Strange problem occuring. I have a simple QTableView displaying an sqlite table. I can change the data in the table and the changes are sent to the database, but as soon as I exit out of the application and I look at the database table again, the data that was added/changed is not there , but while the app was running I could see the data with a separate db viewing utility.

Qt Code:
  1.  
  2. model->setTable(tableName);
  3. model->setEditStrategy(QSqlTableModel::OnManualSubmit);
  4. model->setRelation(18, QSqlRelation("Category", "mCategoryID", "mCategoryName"));
  5.  
  6. model->select();
  7.  
  8. m_pMusicTableView->setModel(model);
  9. m_pMusicTableView->hideColumn(0);
  10.  
  11. m_pMusicTableView->show();
  12.  
  13. ...
  14.  
  15. void DlgLibraryEditor::submit()
  16. {
  17. model->database().transaction();
  18. if (model->submitAll()) {
  19. model->database().commit();
  20. } else {
  21. model->database().rollback();
  22. QMessageBox::warning(this, tr("Library Manager"),
  23. tr("The database reported an error: %1")
  24. .arg(model->lastError().text()));
  25. }
  26. }
To copy to clipboard, switch view to plain text mode 

any insight greatly appreciated.

Thanks,
Johnny