What is the purpose of setAutoCommit() ?



What is the purpose of setAutoCommit() ?..

Answer / shahnawaz sheikh

If AutoCommit is off, then any update or insert operation
perforned on database will not be reflected just after the
query is executed.Though the operation has been
successfully completed.
We will have to commit the transaction manually, to view
the incurred changes.
This also keeps user on the safer side, if some
undesirable row has been inserted,updated or deleted in the
database then it can be rollback.

While if the AutoCommit is on any update,insert or delete
are at once reflected onto the database.

Is This Answer Correct ?    13 Yes 1 No

Post New Answer

More Core Java Interview Questions

What are the benefits of operations?

0 Answers  


Can we override static methods in java?

0 Answers  


What is meant by Session? Explain something about HTTP Session Class?

1 Answers  


What is aggregation and composition ?

1 Answers   Fidelity,


What is the different types of functions?

0 Answers  






What is an i/o filter?

0 Answers  


What are internal and external variables?

0 Answers  


Explain when classnotfoundexception will be raised ?

0 Answers  


How will you invoke any external process in java?

0 Answers  


What is passing parameters in java?

0 Answers  


Can we have a method name same as class name in java?

0 Answers  


What are some alternatives to inheritance?

0 Answers  


Categories