This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Need urgent help with ResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Need urgent help with ResultSet" Watch "Need urgent help with ResultSet" New topic

Need urgent help with ResultSet

Othmar Stehlik
Ranch Hand

Joined: Jul 24, 2001
Posts: 36
I have a servlet, that inserts parameters in a database.
Its a kind of guestbook, I Select the entreis from the table and want to print them out, an entry, an HR, the next entry.
Here�s a code snippet:
Vector entries = new Vector();
rs.executeQuery("SELECT name FROM actor");
for(int i=0; i<entries.size(); i++){>

The problem is, that I don�t know, how to get every entry, and after the entry a HR printed.
I tried different way, but nothing worked.
Perhaps, there is a method to count the number of entries, and use this in a for loop?
I really appreciate any suggestion!
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879
I can't make any sense of your code snippet! This leads me to believe that you might want to look at the tutorial. It has the information you were asking for as well.
I agree. Here's the link:
subject: Need urgent help with ResultSet
Similar Threads
How to put java.util.Properties into XML column of Sql Server
Keep the combobox entries after the form submission
How to create an arraylist in action class and then capture in struts option?