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 metadata in java programming?
Why do we use jdbc?
what is the meaning of following code snippets Class c=class.forName(driverClassName); Driver d=(driver)c.newInstance();
What do you understand by jdbc driver and explain its types?
What is savepoint in jdbc?
How do I stop nullpointerexception?
What is jdbc in dbms?
What are the packages are used in jdbc?
Is it possible to connect to multiple databases simultaneously?
What is the use of jdbc api?
Explain the locking system in jdbc?
What's the benefit for specifying constraints like not null, primary key explicitly instead of specifying it against the column ?
What are the different classes through which JDBC represents statements?
How many types of resultset are there in jdbc?
Why do we need jdbc?