I recall mentioning that you want to do one batch commit ,so here you need to be calling pStsmt.addBatch() and then call pStmt.executeBatch() once after the loop