permaculture playing cards
The moose likes JDBC and Relational Databases 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 REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "checking resultset" Watch "checking resultset" New topic

checking resultset

Denna Ramani

Joined: Feb 28, 2004
Posts: 2
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
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.
subject: checking resultset
It's not a secret anymore!