• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResultSet please help

 
santosh vashist
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I want to check if resultset contains some record or not.
How to do this with using next().can any body help please.

thanks,
santosh
 
Sandeep Jain
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ,
U camen make use od if condition there ie
ResultSet rs=stmt.executeQuery("UR Query");
if(rs.next())
{
while(rs.next())
{
String item1=rs.getString(1);
bla
bla
bla
}
}
rs.close();
stmt.close();

------------------
Try and Try Till u succeed
Sandeep Jain
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic