databaseManager.commitTransaction() fails

i have a button ‘add new record’ on a list form. the methode is:

databaseManager.startTransaction();
controller.newRecord();
m_edit(); //this opens an input form in a dialog on the same table

on the input formInDialog is a button ‘save’. it has the methode:

databaseManager.commitTransaction();
databaseManager.saveData();

by clicking the button ‘save’, the started transaction does not commit! i don’t no why? on other tables and forms in my solution this works well, but not at this table.

What database do you use? Does it support transactions?

When using transactions, I put the savedata before the commit line:

databaseManager.saveData(); 
databaseManager.commitTransaction();

I pretty sure this is the way it should be done (especially if autosave is off).

What database do you use? Does it support transactions?

the database is ms sql server 2005 and the same methodes are working well in other tables also on the ms sql server.


Code:
databaseManager.saveData();
databaseManager.commitTransaction();

i changed the code in my methode like your suggestion, but now the transaction makes a rollback not a commit???

I know this might sound strange but is there something in your method ‘m_edit()’ that changes the expected behavior?

hello marcel!

not in the ‘m_edit’ methode, but it seems the problem is in the ‘onShow’ methode of the ‘input’ form.
i tried a couple of combinations in my ‘onShow’ methode… and how wonder… it works!

thank you :-)

Glad that is solved :)