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

Reply via email to