Rollback but keeps the first change

Questions, tips and tricks and techniques for scripting in Servoy

Rollback but keeps the first change

Postby Foobrother » Thu Jul 16, 2009 2:49 pm

Hi everybody,

I have a TabPanel containing a form which displays a list of options read from the database which can be checked/unchecked. The Check boxes are also linked to the database.
When the user clicks on the button "Cancel" or closed the window with the cross, I do:
Code: Select all
databaseManager.rollbackEditedRecords();
databaseManager.rollbackTransaction();
application.closeFormDialog();


However if I tick/untick several options, and cancel it, all of them will be unsaved except the first change I made :roll:
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Rollback but keeps the first change

Postby jcompagner » Fri Jul 17, 2009 5:25 pm

at what time do you set databasemanager.setAutoSave(false) ?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Rollback but keeps the first change

Postby Foobrother » Fri Jul 17, 2009 5:43 pm

jcompagner wrote:at what time do you set databasemanager.setAutoSave(false) ?

I didn't check actually! I though it was already OFF as it rolls back the other changes. :oops:
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm


Return to Methods

Who is online

Users browsing this forum: No registered users and 36 guests