I want to select the maximum line number from my database \"Logs\" and store it in a variable m
.
Here\'s my code:
ResultSet rs
A ResultSet cursor is initially positioned before the first row, the first call to the method next makes the first row the current row, the second call makes the second row the current row, and so on.
consider you have something like this.
->1->2->3
^
your "rs" is initially pointed before 1, when you call rs.next() it advances the arrow to point to 1
->1->2->3
^
so if you do not call the next() method then you do not get the result.
Hope this helps