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 |
What is two-phase commit in the database?
Why can't I invoke the ResultSet methods afterLast and beforeFirst when the method next works?
What is JDBC API and when do we use it?
What is the execute method in java?
What is Connection Pooling ??? How we set up a particular connection within connection pooling ????
Expalin the method of calling a stored procedure from jdbc.
What are the methods which can verify the cursor particular position?
i am user who logined the application..after that another valid user will also logind..so that is it neccessary to create jdbc connection for each and every user...plz explain it with proper answer...plz help me
What is the jdbc rowset?
Why do we use jdbc in java?
What is a java driver?
wahts is mean by primary key and unique key?