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

Answers were Sorted based on User's Feedback



What are batch updates. in jdbc..

Answer / gajendra

Batch updates is a facility given by the JDBC to the
application developers to submit a set of SQL update
statements as batch to the database.

st.addBatch("Update statement1");
st.addBatch("Update statement2");
st.addBatch("Update statement3");

int updated[]=st.executeBatch();// This methods throws
BatchUpdateException and SQLException

Is This Answer Correct ?    3 Yes 0 No

What are batch updates. in jdbc..

Answer / 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

More Core Java Interview Questions

What are the important features of Java 9 release?

0 Answers  


explain different ways of using thread? : Java thread

0 Answers  


how to pass the parameters to applets?

1 Answers  


How many types of design patterns are there?

0 Answers  


What are the OOPS concepts in Java ?

4 Answers   Satyam,


How will you serialize a singleton class without violating singleton pattern?

0 Answers  


Can set contain duplicates?

0 Answers  


explain the concept of inheritance with an example?

9 Answers   Polaris,


Tell me how many ways are there to initialise an integer with a constant.

0 Answers   Aricent,


whats the difference between == and .equal ?

10 Answers   Cisco,


Explain listiterator and methods in listiterator?

0 Answers  


wHAT IS DEFAULT SPECIFIER IN JAVA wHAT IS DEFAULT CONSTRUCTOR IN JAVA wHAT IS DEFAULT METHOD IN JAVA

12 Answers   IBM,


Categories