Thanks Mirek for your advice about transaction and GUI.
To go further, do you recommend to put the code in the close function of the dialog window so the user can choose to quit the dialog and save the modifications or discard these modifications ?
Biobytes
Actually, I think it is usually best:
- load data, do not start trasaction
- GUI editing
- if user presses Cancel, do nothing
- if OK, update/insert to DB; only if there is more than single statement involved, use transaction (otherwise single statement is transaction of its own)