Transaction example.

Posted by Admin on 20-Jun-2011 08:08

1.   can any body write a piece of code using transaction. The code should rollback the current event (if condition do not meet) and should continue iteration. (You can specify the condition by yourself).  Help me its urgent.

All Replies

Posted by gus on 20-Jun-2011 15:47

do transaction:

    find account where account.id = sourceAccount.

    account.balance = account.balance - xferAmount.

    if ((account.balance

    find account where account.id = destinationAccount.

    account.balance = accoun.balance + xferAmount.

end.

This thread is closed