I am trying to add batches from a prepared statement for exact to 3000 times, but when executebatch()
is called, the number of affected rows returned is 2048, and this happens for values add batch call statements greater than 2048. From where is the count 2048 is returned, I am unable to guess. Can someone please help me with this.
Here is my code for this:
while (resultSet.next()) {
for (int i = 0,j=0; i < noOfColumns && j < noOfColumns; i++) {
//Setting values here for preparedStatement using setString()
}
pstmt.addBatch(); ==> this is called for more than 3000 times
try {
if(++count % batchSize == 0){
updatedCnt=pstmt.executeBatch(); ==> Here batch size is set to 3000 and executebatch returns 2048
successRowCnt = successRowCnt + updatedCnt.length;
}
if (count ==numberofRowsForCloning) {
isResultMatch = false;
break;
}
}
}