I am using Spring JDBCTemplate batchUpdate to insert data into a package. I want to check if the data is inserted successfully. JDBCTemplate batchUpdate returns int [] [], so what is the correct way to verify that data is inserted?
This says: "All batch update methods return an int array containing the number of rows affected for each batch record. The JDBC driver is not always available, in which case the JDBC driver simply returns -2." I can not understand the return value of -2 here. Does this mean that the insert was unsuccessful?
-2 , , , .
-2 - Statement.SUCCESS_NO_INFO ( EXECUTE_FAILED - -3). , JDBC, -2
BatchUpdateException
, N script, :
int result[] = jdbcTemplate.batchUpdate(sql);
:
result[0]
,
result[1]
..