java - How to ignore error in JDBC's executeBatch function -


i want insert data rdbms(mysql5.7, jdbc5.1), , using executebatch speed up. found when 1 insert sql of batch of statement cannot execute properly, remain ignored. have not expectd. want let rdbms ignore error sql , continue execution.

can tell me should or show me right documentation url. , glad help!

and know "insert ... on duplicate key ... " can ignore duplicate key error , want 1 more general solution.

mysql jdbc doc

connection connection = getconn(); statement statemenet = connection.createstatement(); (searchuseritem user: result.getitems()) {     string query = "insert table values(some_values)"; } int[] re = statemenet.executebatch(); ananlysebatchresult(re); statemenet.close(); connection.close(); 


Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -