How transactions are performed using JDBC ?
Answers were Sorted based on User's Feedback
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 |
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 |
Explain about column name and getter method?
How to check jdbc connection in java?
What are the differences between setmaxrows(int) and setfetchsize(int)?
Is jdbc database independent?
What is Type-1 Driver and when this driver is used?
What is the use of jdbc api?
Can we have foreign key reference to a non primary key column ?
Explain creation of statement object with connection method create method with help of an example.
What are the differences between stored procedure and functions?
What is setautocommit in jdbc?
What are the advantages of using preparedstatement over statement?
What is JDBC RowSet? What are different types of RowSet?