Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How transactions are performed using JDBC ?

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


Please Help Members By Posting Answers For Below Questions

What is connection pooling and why it is used?

935


Explain the difference between resultset and rowset in jdbc

954


How many ways can you update a result set?

956


What does connection pooling mean ?

933


What is addbatch jdbc?

951


Is jdbc a framework?

843


What is a jdbc connection?

834


How to invoke Oracle Stored Procedure with Database Objects as IN/OUT?

1011


Does the JDBC-ODBC Bridge work with Microsoft J++?

2261


What is xe in oracle jdbc url?

997


What is jdbc connection class?

843


How does JDBC API helps us in achieving loose coupling between Java Program and JDBC Drivers API?

1020


What is data source in java?

896


Differentiate between a statement and a preparedstatement.

931


What are the flow statements of jdbc?

948