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 jdbc in dbms?

1042


What is xe in oracle jdbc url?

1092


What is the use of getGeneratedKeys() method in Statement?

1019


Why “no suitable driver” error occurs?

1089


How many types of jdbc drivers are available?

938


What is the significance of DataBaseMetaData.tableIndexStatistics? How to obtain and use it?

984


What is represented by the connection object?

1083


How many ways can you update a result set?

1020


What is jdbc? Describe the steps needed to execute a sql query using jdbc.

937


What happens if connection is not closed in jdbc?

979


What are the steps to connect to the database in java?

979


Expalin the method of calling a stored procedure from jdbc.

974


What do you understand by jdbc datasource?

1029


Can we return resultset in java?

933


What is an escape syntax?

998