Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and the fly likes checking resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "checking resultset" Watch "checking resultset" New topic
Author

checking resultset

Denna Ramani
Greenhorn

Joined: Feb 28, 2004
Posts: 2
hi,
i have a problem with the Resultset. I read the resultset with getString(0
or getInt() method. but then i need to check that results for some condiions.I tried stroring all the values in array and arryalist. but if i have 5 cols then i have to create 5 arrays. I think thats not the efficent way to do this.
Does anybody have some idea about this?
Thanks in advance
Denna
Dana Hanna
Ranch Hand

Joined: Feb 28, 2003
Posts: 227
Why store the values? Depending on the architecture of your app, you may want to check them as they come out.
If you need to seperate the logic - create a class that represents a row in the database, then create an array out of that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: checking resultset