On Tuesday 06 September 2016 12:38:56 mohamed hamza wrote: > Hi Martin, > > Can you guide me how to implement a Undo/Redo System using savepoint > with mseide?
Redo is not possible with savepoints. In order to make a undo/redo system one probably needs to maintain a changes journal. TSQLTransaction.SavepointBegin() starts a savepoint and returns the savepoint nesting level as ID. TSQLTransaction.SavepointRollback(<ID>) rollbacks to a savepoint. <ID> = -1 -> rollback to the top level savepoint. TSQLTransaction.SavepointRelease() releases the top level savepoint. The TSQLTransaction.SavepointLevel property shows the current savepoint nesting level, -1 = none. Setting TmseSQLQuery.Controller.Options dso_postsavepoint or dso_deletesavepoint automatically uses savepoints for atomic master-slave operations for example. > Do I have to use TransactionWrite or just Transaction ? Either use a single "Transaction" or "TransactionWrite". > How to > disable autocommit for all tmsesql? > Disable TmseSQLQuery.Controller.Options dso_autocommit/dso_autocommitret, TSQLStatement/TmseSQLScript.Options sso_autocommit/sso_autocommitret. There is also TSQLStatement/TmseSQLScript.Options sso_savepoint which uses savepoint protected execute(). Martin ------------------------------------------------------------------------------ _______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

