How to get how many rows updated with PreparedStatement?
.getUpdateCount()
returns 0.
For executeUpdate
got error:
error occurred during batching: batch must be either executed or cleared
my code:
updTrans = dataSource.getConnection().prepareStatement("update...");
updTrans.setInt(1, Integer.valueOf(transaksjonstatusid));
...
updTrans.addBatch();
upd = updTrans.executeUpdate();