thanx but the problem is that if I do collect the data into a list then the resultset is lost so if I want to access the records I will have to access the list. Am I right or is there a way to still access the records in the resultset peter
-----Original Message----- From: Arnaud Hallais [mailto:[EMAIL PROTECTED]] Sent: 05 October, 2001 12:35 PM To: [EMAIL PROTECTED] Subject: Re: recordcount in jdbc 1 Hi, there is no way other than going through the all resultSet to know how many lines are in it. So two solutions : // solution 1: run your query, count the number of lines,re-run your query (to get a fresh resultset), go through it to treat data --> problem: if someone commits any new value between the two query run, you'll get different row count for the two query // solution 2: run your query, collect data into a dynamic structure like ArrayList or what ever you think is good for you. --> problem: this solution can take a lot of memory, but it is always right ----- Original Message ----- From: "Peter Barraud" <[EMAIL PROTECTED]> To: "'swing'" <[EMAIL PROTECTED]> Sent: Friday, October 05, 2001 5:58 AM Subject: recordcount in jdbc 1 > Hi, > Anybody has any idea of how to get the recordcount of a resultset using jdbc > 1. Not JDBC 2. > Any suggestions would be great > _______________________________________________ > Advanced-swing mailing list > [EMAIL PROTECTED] > http://eos.dk/mailman/listinfo/advanced-swing _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing