I have to update 5 tables simultaniously which are inter related with each other. My requirement is if all tables are updated successfully then all the updates will be commited. if any one of the query is failed due to some reason all the queried should be rolledback.
The way I handled the transactions is
I set the auto commit to false
executed the update queries
set the auto commit to true
But I am getting the following error message:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Can't start ma
nual transaction mode because there are cloned connections.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.setAutoCommit(Unknown Source)
the sample code is:
I've writen the code in the above maner. Because of my code is very lengthy I can't provide the exact code here. But I think this will help you to understand my problem.
Please suggest me a solution to solve this problem. If there is any other way to handle this scenario please suggest me the better way.