Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


How transactions are performed using JDBC ?

Answers were Sorted based on User's Feedback



How transactions are performed using JDBC ?..

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

How transactions are performed using JDBC ?..

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

Post New Answer

More JDBC Interview Questions

Why is jdbc used?

0 Answers  


How to use JDBC to connect Microsoft Access?

0 Answers  


What is addbatch jdbc?

0 Answers  


What is the difference between ExecuteUpdate and ExecuteQuery?

1 Answers   Exilant,


Which type of driver provides jdbc access via one or more odbc drivers?

0 Answers  






Explain the difference between rowset vs. Resultset in jdbc?

0 Answers  


explain about special characters?

0 Answers  


Is there another way of dealing with the result set that could execute faster?

0 Answers  


What is JDBC ResultSet?

0 Answers  


Result set’s index starts with 0 or 1?

0 Answers  


Are all the required JDBC drivers to establish connectivity to my database part of the JDK?

0 Answers  


What is a statement in java?

0 Answers  






Categories