I use a PreparedStatemen as such: I compile a sql in the PreparedStatement. I set the parameters, Add them to the batch using addBatch() method, set the parameters, addBatch, ....
After a while I would like to see how many of these commands(the set of parameters) are currently in the batch. I mean before I execute the executeBatch method.
I would think this would be a method on PreparedStatement (or Statement), but I can't find any solution except keeping a counter for each PreparedStatement.
I don't like this very much so I was wondering if there isn't another method to achieve this.