Answer Posted / ketan
transaction means two or more queries are perform
simultaneously.
1. Hence befor first query put up setAutoCommit(false);
2. now at the end of several queries performed. if you know
how much rows will affect this transaction then you can
compare it with current transaction rows.
3. if both equals then commit() and setAutoCommit to true in
else rollback() and setAutoCommit(true).
4. as well as in catch statement put rollback() and
setAutoCommit(true);
5. and in finally setAutoCommit(true).
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What does setautocommit do?
Is jdbc and orm?
What is metadata in jdbc?
What does the jdbc resultsetmetadata interface?
How can you create jdbc statements?
Is jdbc a framework?
What are the jdbc statements?
What protocol does jdbc use?
What is JDBC DataSource and what are it’s benefits?
How can we set null value in jdbc preparedstatement?
Is jdbc connection secure?
What is the most common example type 1 driver?
What are the standard isolation levels defined by JDBC?
How do I set properties for a JDBC driver and where are the properties stored?
What are the packages are used in jdbc?