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...

What are batch updates. in jdbc

Answer Posted / vijayakumar chinnasamy

Batch Update provide the functionality of executing a group
of sql statement at single timing.

Steps:

1.set autocommit as false for connection .
connectionObject.setAutoCommit(false);
2.create sql statement and add to statement object.
statementObj.addBatch("sql1");
statementObj.addBatch("sql2");
statementObj.addBatch("sql3");
3.execute the batch of statement using executeBatch().
statementObj.executebatch();
4. commit the connection.
connectionObj.commit();

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if we override private method?

967


Can the garbage collection be forced by any means?

989


Break statement can be used as labels in java?

999


What is static import?

1164


What are decalarations?

1121


If a method is declared as protected, where may the method be accessed?

1012


What are the 2 types of java programs?

1109


What is the instance of an object?

1192


Write a code to create a trigger to call a stored procedure

975


Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?

1022


From the two, which would be easier to write: synchronization code for ten threads or two threads?

1051


Using callable statement how can you pass out parameters, explain with example?

1229


What is the difference between size and length in java?

972


Why does java have two ways to create child threads? Which way is better?

1044


Name few "optional" classes introduced with java 8 ?

1134