|
Hi, I m getting this error when I m running update & insert query in transaction. while inserting,in middle of transaction throw this error and few records insert in table. while update,getting this error every time and records not updating. please help me if any one have solution for this problem. Here is the code:
(comments are locked)
|
|
Kirti, you need to get rid of all the try/catch blocks except for ONE that wraps the entire transaction. Either the transaction is going to succeed or it isn't, you can still set the msg to what you are about to attempt, but you only need one try block. In your code, if the for/loop fails, it rolls back the transaction, then drops down and tries to commit/rollback when the transaction doesn't exist anymore.
(comments are locked)
|

