Hi. I'd like to write crash safe SQL code. In this simple form http://pastebin.com/yqyGDtpt I'm able to insert values using the QDataWidgetMapper.
If I set the model (QSqlTableModel) to AutoSubmit everything works fine but this leads to increasing primary keys if the user hits the cancel button since the row has actualy been inserted in the database and if the application would crash in the dialog the row would reamain. So I set the model to ManualSubmit. The current code inserts a new row, fills the row in the table with the values as you're typing (so the mapper works fine I think) but if you actually hit submit you end up with a blank row and just a valid ID. Anyone an idea where the other values get erased? regards Knut _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
