This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ResultSet please help  RSS feed

 
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
Boost this thread!