Hi, I need to execute a batch/transaction having a set of statements.I need to commit those statements which are executed successfully and the rest should be rolled back,is there any way to do it in java?
Manish, Yes. There is a feature called autoCommit. Normally, statements are set to commit automatically after each one is run. You can set this to false and then explicitly call commit/rollback. Take a look at the Connection object for these methods.