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
Is possible to open a connection to a database with exclusive mode with JDBC?
Which jdbc drivers will run your program?
What are the different classes through which JDBC represents statements?
What is difference between odbc and jdbc?
How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column?
What is JDBC PreparedStatement?
Is jdbc object oriented?
What is isolation level? How to set it?
What is the latest version of JDBC? What are the new features added in that?
What is ojdbc?
What is encrypted connection?
What causes no suitable driver error?
java based application for hospital management
What is jdbc and jdbc drivers?
any one can explain about policy file rule? when i connect database with applet then ther is no compile time error but the run time error is occureed.i.e access is denied.policy file rule is related to this problem.