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

why using interface interface ?

1972


Is ++ operator is thread safe in java?

892


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

890


Can we define a package statement after the import statement in java?

1018


What is difference between == and === in js?

959


Why set do not allow duplicates in java?

1002


What is the point of java?

968


What is the locale class in java programming?

1001


Explain the importance of throws keyword in java?

940


How can I become a good programmer?

920


Write a program in java to create a doubly linked list containing n nodes.

907


What is void class in java?

912


What is a functional interface?

966


Can we declare a class as static?

1037


Implementations of set interface?

942