Am I correct in assuming you want the number of rows BEFORE you iterate
the result set?
If you are using JDBC 1.2 you can do it like this (snippet):
//declare your Statement to return a scroll insensitive result set
//before you make the query
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_READ_ONLY);
//get the number of rows by scrolling to the last row,
//getting its number, then returning to the start:
try {
resultSet.last();
numberOfRows = resultSet.getRow();
resultSet.beforeFirst();
} catch (Exception e) {
e.printStackTrace();
}
--- Anibal Constante Brito <[EMAIL PROTECTED]> wrote:
> > Hy,
> >
> > you can use rs.RecordCount
> >
> > Regards
> > Marcus
>
> the ResultSet don't have this property?, sorry, but you answer don't
> help
> me.
>
> Owen.
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>