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
What is jdbc in dbms?
What is xe in oracle jdbc url?
What is the use of getGeneratedKeys() method in Statement?
Why “no suitable driver” error occurs?
How many types of jdbc drivers are available?
What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?
What is represented by the connection object?
How many ways can you update a result set?
What is jdbc? Describe the steps needed to execute a sql query using jdbc.
What happens if connection is not closed in jdbc?
What are the steps to connect to the database in java?
Expalin the method of calling a stored procedure from jdbc.
What do you understand by jdbc datasource?
Can we return resultset in java?
What is an escape syntax?