I am using several insert statements in a method in Java.
If the connection fails in between I want to roll back the inserted rows.
I cant use con.rollback(), because there is no connection.
How to handle such situation?
Thanks in advance.
If no explicit commit has been given at the time the connection goes away, then the transaction is automatically rolled back by the server. The client doesn't need to do anything about it (apart form handling the client-side aspects).