public boolean next()
throws SQLException
Moves the cursor down one row from its current position. 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.
Returns:
true if the new current row is valid; false if there are no more
rows
Throws:
SQLException - if a database access error occurs
mfs
Vladimir Grishchenko wrote:
> >
> > ps I'm surprised "boolean found = rs.next()" works if result set is empty.
> > I'd kind of expect a null pointer exception. I always do
> > if (rs != null && rs.next()) {
> > // assign something
> > }
> > if i'm expecting a single row.
>
> I guess there's a difference between an empty ResultSet and no ResultSet :)
>
> --V.