How transactions are performed using JDBC ?
Answers were Sorted based on User's Feedback
Answer / devarathnam c,kotagudibanda(po
Hi... Using the following methods we can perform
transactions in JDBC
1:commit();
2:rollback();
3:setAutoCommit();These are in the Connection interface
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / 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 |
Why is jdbc used?
Does the JDBC-ODBC Bridge support multiple concurrent open statements per connection?
What are the utilities of the callablestatement?
What is resultset?
There is a method getColumnCount in the JDBC API. Is there a similar method to find the number of rows in a result set?
What are the main steps in java to make JDBC connectivity?
Explain the process of creating tables using NetBeans IDE?
What is the difference between Union, Unionall ?
What is Statement and PreparedStatement? whatz the difference?
What are the different classes through which JDBC represents statements?
what is CallableStatement and what is its usage?
How is database middleware used to access legacy databases?