Nuno Magalhaes wrote: > I'm using SQLite for an academic project, through Java's JDBC > (sqlitejdbc-0.5.4.jar). After executing a simple select, i can iterate > the ResultSet all the way (showing to output), no problem. The > problem, which may be silly, is that i need to get a row count so i > can initialize a variable.
In general, it is impossible to find out how many rows are in the resultset short of iterating over it and counting. You could run a query like "select count(*) from ...", but that just tells SQLite to do the same thing - iterate over all rows it would have produced, and count them. Thus it takes approximately the same time as the original query, but you get less information back. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users