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 is connection pooling and why it is used?
Explain the difference between resultset and rowset in jdbc
How many ways can you update a result set?
What does connection pooling mean ?
What is addbatch jdbc?
Is jdbc a framework?
What is a jdbc connection?
How to invoke Oracle Stored Procedure with Database Objects as IN/OUT?
Does the JDBC-ODBC Bridge work with Microsoft J++?
What is xe in oracle jdbc url?
What is jdbc connection class?
How does JDBC API helps us in achieving loose coupling between Java Program and JDBC Drivers API?
What is data source in java?
Differentiate between a statement and a preparedstatement.
What are the flow statements of jdbc?