File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes ResultSet please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ResultSet please help" Watch "ResultSet please help" New topic
Author

ResultSet please help

santosh vashist
Greenhorn

Joined: May 14, 2001
Posts: 25
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

Joined: Oct 25, 2000
Posts: 124
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


Try and Try Till u succeed<br /> <br />Sandeep Jain
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResultSet please help