Actually, this is bad logic. Commit tran commits the outermost transaction regardless. What should happen is there should be a conditional check before the attempt to start a nested transaction if in a tran, instead create a savepoint....and then on a rollback rollback to the savepoint....and if proc was called from within a tran, then don't call the commit.... ASE really doesn't support nested transactions the way folks think....if you think about it, what you really want is only ONE begin tran/commit tran pair.....everything else should be a save transaction and rollback to savepoint
↧