Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

checking resultset

 
Denna Ramani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic