What are batch updates. in jdbc
Answers were Sorted based on User's Feedback
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 |
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 |
what is servlet filter?
Which method returns the length of a string?
What is the java reflection api? Why it’s so important to have?
what is the use of thread?Justify it by project point of view
Can we restart a thread already started in java?
What is a superclass?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
What is a serializable interface?
what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread
What is the declaration statement?
What is the maximum length of a url?
is it possible to add a object in a HASHMAP