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

Why javac is not recognized?

0 Answers  


What is the top class of AWT event hierarchy?

5 Answers  


Write a program to print fibonacci series

0 Answers  


What is a singleton in genetics?

0 Answers  


What is the benefit of inner classes in java?

0 Answers  






What is the difference between yielding and sleeping in java programming?

0 Answers  


How do you write a good declaration?

0 Answers  


What is the method in java?

0 Answers  


what is the major difference between linkedlist and arraylist in java?

0 Answers   IBS,


What is a line break?

0 Answers  


Can a lock be acquired on a class?

3 Answers  


What do you understand by a Static Variable?

0 Answers   CGI,


Categories