Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JDBC and Relational Databases
ResultSet
lape show
Greenhorn
Posts: 6
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Please
how can i get the number of rows returned by a resultset. i need to pass data retrieved from SQL into an array then to the table model and finally to the jtable, but i need to know the size of the array.
lape
Brian Enochson
Greenhorn
Posts: 14
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This has been covered.
https://coderanch.com/t/303346/JDBC/java/find-number-rows-resultset
.
What you can also do is a select count with an identical where clause to your where used for the actual select?
Lastly, instead of using an array where you need to allocate it, add your results from your result set to an ArrayList as it will grow dynamically.
Brian
Campbell Ritchie
Marshal
Posts: 79177
377
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
. . . and welcome to the Ranch, both of you
lape show
Greenhorn
Posts: 6
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks a bunch!!!
lape
Brian Enochson
Greenhorn
Posts: 14
I like...
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thank you.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
SQL Array Question
Resultsets survives failure
returning a ResultSet?
Display Data Records in Table
Passing VARRAYS to Java
More...