Answers were Sorted based on User's Feedback
Answer / ketan
transaction means two or more queries are perform
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
5. and in finally setAutoCommit(true).
|Is This Answer Correct ?||0 Yes||0 No|
Why is jdbc used?
How to use JDBC to connect Microsoft Access?
What is addbatch jdbc?
What is the difference between ExecuteUpdate and ExecuteQuery?
Which type of driver provides jdbc access via one or more odbc drivers?
Explain the difference between rowset vs. Resultset in jdbc?
explain about special characters?
Is there another way of dealing with the result set that could execute faster?
What is JDBC ResultSet?
Result set’s index starts with 0 or 1?
Are all the required JDBC drivers to establish connectivity to my database part of the JDK?
What is a statement in java?